diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-11-20 13:51:27 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:18 +0800 |
commit | 194c8fdc922b4173cf433e8f92711459b97c3ab0 (patch) | |
tree | 337ebd9c4a22cec51e32d6f03d15988156ad137b /vendor/github.com/dexon-foundation/dexon-consensus/core/lattice-data.go | |
parent | d035ac7c8c624fc884dbc300a2ec7dcaf8dc1905 (diff) | |
download | go-tangerine-194c8fdc922b4173cf433e8f92711459b97c3ab0.tar go-tangerine-194c8fdc922b4173cf433e8f92711459b97c3ab0.tar.gz go-tangerine-194c8fdc922b4173cf433e8f92711459b97c3ab0.tar.bz2 go-tangerine-194c8fdc922b4173cf433e8f92711459b97c3ab0.tar.lz go-tangerine-194c8fdc922b4173cf433e8f92711459b97c3ab0.tar.xz go-tangerine-194c8fdc922b4173cf433e8f92711459b97c3ab0.tar.zst go-tangerine-194c8fdc922b4173cf433e8f92711459b97c3ab0.zip |
vendor: sync to latest core (#37)
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus/core/lattice-data.go')
-rw-r--r-- | vendor/github.com/dexon-foundation/dexon-consensus/core/lattice-data.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/lattice-data.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/lattice-data.go index ce6d32ba3..6fe810ac0 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus/core/lattice-data.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/lattice-data.go @@ -26,12 +26,12 @@ import ( "github.com/dexon-foundation/dexon-consensus/common" "github.com/dexon-foundation/dexon-consensus/core/blockdb" "github.com/dexon-foundation/dexon-consensus/core/types" + "github.com/dexon-foundation/dexon-consensus/core/utils" ) // Errors for sanity check error. var ( ErrDuplicatedAckOnOneChain = fmt.Errorf("duplicated ack on one chain") - ErrInvalidChainID = fmt.Errorf("invalid chain id") ErrInvalidProposerID = fmt.Errorf("invalid proposer id") ErrInvalidWitness = fmt.Errorf("invalid witness data") ErrInvalidBlock = fmt.Errorf("invalid block") @@ -181,7 +181,7 @@ func (data *latticeData) sanityCheck(b *types.Block) error { } // Check if the chain id is valid. if b.Position.ChainID >= config.numChains { - return ErrInvalidChainID + return utils.ErrInvalidChainID } // Make sure parent block is arrived. chain := data.chains[b.Position.ChainID] @@ -382,7 +382,7 @@ func (data *latticeData) prepareBlock(b *types.Block) error { } // If chainID is illegal in this round, reject it. if b.Position.ChainID >= config.numChains { - return ErrInvalidChainID + return utils.ErrInvalidChainID } // Reset fields to make sure we got these information from parent block. b.Position.Height = 0 |