Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
GalaxySciTech committed Aug 7, 2024
1 parent d39554e commit 9361fff
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion consensus/tests/engine_v2_tests/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ func PrepareQCandProcess(t *testing.T, blockchain *BlockChain, currentBlock *typ
func CreateBlock(blockchain *BlockChain, chainConfig *params.ChainConfig, startingBlock *types.Block, blockNumber int, roundNumber int64, blockCoinBase string, signer common.Address, signFn func(account accounts.Account, hash []byte) ([]byte, error), penalties []common.Address, signersKey []*ecdsa.PrivateKey, merkleRoot string) *types.Block {
currentBlock := startingBlock
if len(merkleRoot) == 0 {
merkleRoot = "711be05c0b9d89bd511dd4c20ade1820b2c1fb13343ee0cedd3869150eb2d377"
merkleRoot = "c778a53427689109ddaedda8c5271caaf622da65dfbb1b38b47561d4b0c94ac3"
}
var header *types.Header
statedb, err := blockchain.State()
Expand Down
4 changes: 2 additions & 2 deletions consensus/tests/engine_v2_tests/mine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestYourTurnInitialV2(t *testing.T) {
t.Logf("Inserting block with propose at 11...")
blockCoinbaseA := "0xaaa0000000000000000000000000000000000011"
//Get from block validator error message
merkleRoot := "711be05c0b9d89bd511dd4c20ade1820b2c1fb13343ee0cedd3869150eb2d377"
merkleRoot := "c778a53427689109ddaedda8c5271caaf622da65dfbb1b38b47561d4b0c94ac3"
extraInBytes := generateV2Extra(11, parentBlock, signer, signFn, nil)

header := &types.Header{
Expand Down Expand Up @@ -79,7 +79,7 @@ func TestShouldMineOncePerRound(t *testing.T) {
_, err := adaptor.Seal(blockchain, block910, nil)
assert.Nil(t, err)
time.Sleep(time.Duration(minePeriod) * time.Second)
merkleRoot := "711be05c0b9d89bd511dd4c20ade1820b2c1fb13343ee0cedd3869150eb2d377"
merkleRoot := "c778a53427689109ddaedda8c5271caaf622da65dfbb1b38b47561d4b0c94ac3"

header := &types.Header{
Root: common.HexToHash(merkleRoot),
Expand Down
2 changes: 1 addition & 1 deletion consensus/tests/engine_v2_tests/verify_header_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func TestShouldVerifyBlock(t *testing.T) {
err = adaptor.VerifyHeader(blockchain, invalidPenaltiesExistBlock, true)
assert.Equal(t, utils.ErrInvalidFieldInNonGapPlusOneSwitch, err)

merkleRoot := "711be05c0b9d89bd511dd4c20ade1820b2c1fb13343ee0cedd3869150eb2d377"
merkleRoot := "c778a53427689109ddaedda8c5271caaf622da65dfbb1b38b47561d4b0c94ac3"
parentNotExistBlock := blockchain.GetBlockByNumber(901).Header()
parentNotExistBlock.ParentHash = common.HexToHash(merkleRoot)
err = adaptor.VerifyHeader(blockchain, parentNotExistBlock, true)
Expand Down

0 comments on commit 9361fff

Please sign in to comment.