diff options
author | Bojie Wu <bojie@dexon.org> | 2018-10-09 13:28:45 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2018-12-19 20:54:27 +0800 |
commit | ee081f7614985e02053dc8d0bba6513806ec1b19 (patch) | |
tree | d5312535a94012f76a72e0896fe459092628076e /core | |
parent | 0282d618a97878f45fec8fff4f2cb3ded31f78f8 (diff) | |
download | dexon-ee081f7614985e02053dc8d0bba6513806ec1b19.tar dexon-ee081f7614985e02053dc8d0bba6513806ec1b19.tar.gz dexon-ee081f7614985e02053dc8d0bba6513806ec1b19.tar.bz2 dexon-ee081f7614985e02053dc8d0bba6513806ec1b19.tar.lz dexon-ee081f7614985e02053dc8d0bba6513806ec1b19.tar.xz dexon-ee081f7614985e02053dc8d0bba6513806ec1b19.tar.zst dexon-ee081f7614985e02053dc8d0bba6513806ec1b19.zip |
app: check nonce and balance in prepare payload
Diffstat (limited to 'core')
-rw-r--r-- | core/blockchain.go | 6 | ||||
-rw-r--r-- | core/types/block.go | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/core/blockchain.go b/core/blockchain.go index 20b6a341e..9b152d813 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -28,10 +28,9 @@ import ( "sync/atomic" "time" - "github.com/hashicorp/golang-lru" - coreCommon "github.com/dexon-foundation/dexon-consensus-core/common" coreTypes "github.com/dexon-foundation/dexon-consensus-core/core/types" + lru "github.com/hashicorp/golang-lru" "github.com/dexon-foundation/dexon/common" "github.com/dexon-foundation/dexon/common/mclock" @@ -1614,10 +1613,11 @@ func (bc *BlockChain) insertPendingBlocks(chain types.Blocks) (int, []interface{ proctime := time.Since(bstart) // commit state to refresh stateCache - _, err = pendingState.Commit(true) + root, err := pendingState.Commit(true) if err != nil { return i, nil, nil, fmt.Errorf("pendingState commit error: %v", err) } + log.Info("commit pending root", "hash", root) // add into pending blocks bc.pendingBlocks[block.NumberU64()] = struct { diff --git a/core/types/block.go b/core/types/block.go index e8e15d332..07edc40ac 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -91,8 +91,6 @@ type Header struct { WitnessRoot common.Hash `json:"witnessRoot" gencodec:"required"` WitnessReceiptHash common.Hash `json:"witnessReceiptHash" gencodec:"required"` DexconMeta []byte `json:"dexconMeta" gencodec:"required"` - ChainID uint32 `json:"chainID" gencodec:"required"` - ChainBlockHeight uint64 `json:"chainBlockHeight" gencodec:"required"` } // field type overrides for gencodec |