Skip to content

Commit

Permalink
added eth blocknum to the deposit struct (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamdiallam authored and AdityaSripal committed Dec 9, 2018
1 parent 4fcc49e commit 1b58d54
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions contracts/rootchain/RootChain.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ contract RootChain is Ownable {

event AddedToBalances(address owner, uint256 amount);
event BlockSubmitted(bytes32 root, uint256 blockNumber, uint256 numTxns, uint256 feeAmount);
event Deposit(address depositor, uint256 amount, uint256 depositNonce);
event Deposit(address depositor, uint256 amount, uint256 depositNonce, uint256 ethBlockNum);

event StartedTransactionExit(uint[3] position, address owner, uint256 amount, bytes confirmSignatures);
event StartedDepositExit(uint nonce, address owner, uint256 amount);
Expand All @@ -50,6 +50,7 @@ contract RootChain is Ownable {
address owner;
uint256 amount;
uint256 createdAt;
uint256 ethBlocknum;
}

// exits
Expand Down Expand Up @@ -121,8 +122,8 @@ contract RootChain is Ownable {
public
payable
{
deposits[depositNonce] = depositStruct(owner, msg.value, block.timestamp);
emit Deposit(owner, msg.value, depositNonce);
deposits[depositNonce] = depositStruct(owner, msg.value, block.timestamp, block.number);
emit Deposit(owner, msg.value, depositNonce, block.number);

depositNonce = depositNonce.add(1);
}
Expand Down

0 comments on commit 1b58d54

Please sign in to comment.