Skip to content

Commit

Permalink
[AV-1753] merge coreth 0.8.12 (#132)
Browse files Browse the repository at this point in the history
* merge coreth 0.8.12

* add nits (#133)

Co-authored-by: Patrick O'Grady <prohb125@gmail.com>
  • Loading branch information
ceyonur and patrick-ogrady authored Jun 14, 2022
1 parent 4d5c58b commit 172823f
Show file tree
Hide file tree
Showing 29 changed files with 1,174 additions and 495 deletions.
1 change: 1 addition & 0 deletions accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ func (b *SimulatedBackend) Commit(accept bool) {
if err := b.blockchain.Accept(b.acceptedBlock); err != nil {
panic(err)
}
b.blockchain.DrainAcceptorQueue()
}
// Using the last inserted block here makes it possible to build on a side
// chain after a fork.
Expand Down
9 changes: 8 additions & 1 deletion chain/subnet_evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,14 @@ func (self *ETHChain) Reject(block *types.Block) error {
return self.BlockChain().Reject(block)
}

// LastAcceptedBlock returns the last block to be marked as accepted.
// LastConsensusAcceptedBlock returns the last block to be marked as accepted.
// It may or may not be processed.
func (self *ETHChain) LastConsensusAcceptedBlock() *types.Block {
return self.BlockChain().LastConsensusAcceptedBlock()
}

// LastAcceptedBlock returns the last block to be marked as accepted and
// processed.
func (self *ETHChain) LastAcceptedBlock() *types.Block {
return self.BlockChain().LastAcceptedBlock()
}
Expand Down
1 change: 1 addition & 0 deletions chain/subscribe_accepted_heads_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func TestAcceptedHeadSubscriptions(t *testing.T) {
if err := chain.Accept(block); err != nil {
t.Fatal(err)
}
chain.BlockChain().DrainAcceptorQueue()

select {
case fb := <-acceptedChainCh:
Expand Down
1 change: 1 addition & 0 deletions chain/subscribe_block_logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ func TestBlockLogsAllowUnfinalized(t *testing.T) {
if err := chain.Accept(block); err != nil {
t.Fatal(err)
}
chain.BlockChain().DrainAcceptorQueue()

chain.BlockChain().GetVMConfig().AllowUnfinalizedQueries = false
logs, err = api.GetLogs(ctx, fc)
Expand Down
Loading

0 comments on commit 172823f

Please sign in to comment.