forked from cerc-io/plugeth
core/vm, params: ensure order of forks, prevent overflow (#29023)
This PR fixes an overflow which can could happen if inconsistent blockchain rules were configured. Additionally, it tries to prevent such inconsistencies from occurring by making sure that merge cannot be enabled unless previous fork(s) are also enabled.
This commit is contained in:
@@ -1818,6 +1818,7 @@ func setupReceiptBackend(t *testing.T, genBlocks int) (*testBackend, []common.Ha
|
||||
tx *types.Transaction
|
||||
err error
|
||||
)
|
||||
b.SetPoS()
|
||||
switch i {
|
||||
case 0:
|
||||
// transfer 1000wei
|
||||
@@ -1866,7 +1867,6 @@ func setupReceiptBackend(t *testing.T, genBlocks int) (*testBackend, []common.Ha
|
||||
b.AddTx(tx)
|
||||
txHashes[i] = tx.Hash()
|
||||
}
|
||||
b.SetPoS()
|
||||
})
|
||||
return backend, txHashes
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user