Transform results of getBlockByNumber#59
Conversation
69430f3 to
a89f959
Compare
There was a problem hiding this comment.
The main fix required is that the only place in which the timestampIncreaseSeconds is used is when callingevm_getTime , which I also don't think is a method that ever gets used.
We need to add timestampIncreaseSeconds to the current time every time we set a transaction's timestamp and store a block's timestamp.
| */ | ||
| protected getTimestamp(): number { | ||
| return super.getTimestamp() + this.timestampIncreaseSeconds | ||
| protected async getTimestamp(): Promise<number> { |
There was a problem hiding this comment.
This should instead return utils.getTimestamp + this.timestampIncreaseSeconds and should be used to set the timestamp within sendRawTransaction
Use getLatestBlock instead
…rseGetBlockResult
| ) | ||
|
|
||
| const block = await httpProvider.getBlock('latest', true) | ||
| block.timestamp.should.be.gt(timestamp) |
There was a problem hiding this comment.
one note is that if we do end up speeding up transactions enough, then we could end up with block.timestamp equaling timestamp in this test
There was a problem hiding this comment.
Ah good call! I changed it to greater than or equal to just incase.
| // Construct the raw transaction calldata | ||
| const internalCalldata = this.getTransactionCalldata( | ||
| this.getTimestamp(), | ||
| 0, |
* Fix L2XDomainMessenger addr in deploy * xdomain: generalize config, add deploy overrides Co-authored-by: Karl Floersch <karl@karlfloersch.com>
…oxContract remove UseInboxContract and optimize getTxSucceed
### Description Simplifies signature definitions. Closes #59.
### Description Simplifies signature definitions. Closes #59.
Description
getBlockByNumbernow returns timestamps and transaction hashes from the perspective of the full node instead of the perspective of our backend node.Other Changes
getTimestampintoutilsso it can be used in a static method (create) without having to instantiate the class it was in.Metadata
Fixes
Contributing Agreement