Skip to content

Commit

Permalink
Fix ibft test crash after using hardfork compatible signer (#244)
Browse files Browse the repository at this point in the history
# Description

The PR fixes test crash recently brought in by using hard fork
compatible signer instead of a fixed type one.

# Changes include

- [x] Bugfix (non-breaking change that solves an issue)

## Testing

- [x] I have tested this code with the official test suite
  • Loading branch information
DarianShawn authored Nov 8, 2022
1 parent 7e78648 commit 492ec2b
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions consensus/ibft/ibft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"time"

"github.com/dogechain-lab/dogechain/blockchain"
"github.com/dogechain-lab/dogechain/chain"
"github.com/dogechain-lab/dogechain/consensus"
"github.com/dogechain-lab/dogechain/consensus/ibft/currentstate"
"github.com/dogechain-lab/dogechain/consensus/ibft/proto"
Expand Down Expand Up @@ -1214,8 +1215,13 @@ func newMockIbft(t *testing.T, accounts []string, validatorAccount string) *mock
}

ibft := &Ibft{
logger: hclog.NewNullLogger(),
config: &consensus.Config{},
logger: hclog.NewNullLogger(),
config: &consensus.Config{
Params: &chain.Params{
Forks: chain.AllForksEnabled,
ChainID: 100,
},
},
blockchain: m,
validatorKey: addr.priv,
validatorKeyAddr: addr.Address(),
Expand Down Expand Up @@ -1273,8 +1279,13 @@ func newMockIBFTWithMockBlockchain(
}

ibft := &Ibft{
logger: hclog.NewNullLogger(),
config: &consensus.Config{},
logger: hclog.NewNullLogger(),
config: &consensus.Config{
Params: &chain.Params{
Forks: chain.AllForksEnabled,
ChainID: 404,
},
},
blockchain: m,
validatorKey: addr.priv,
validatorKeyAddr: addr.Address(),
Expand Down

0 comments on commit 492ec2b

Please sign in to comment.