aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorBojie Wu <bojie@dexon.org>2018-10-09 13:28:45 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:50 +0800
commitbbc777cf41dffea2fc63e0946e5ce3a7ddce1be7 (patch)
tree3a8ea91d8e41c8479ca1e36795f92670fe2841e6 /core
parentb5c7aaae2a314bb259bf9fc5bd2ee58a4d10661a (diff)
downloadgo-tangerine-bbc777cf41dffea2fc63e0946e5ce3a7ddce1be7.tar
go-tangerine-bbc777cf41dffea2fc63e0946e5ce3a7ddce1be7.tar.gz
go-tangerine-bbc777cf41dffea2fc63e0946e5ce3a7ddce1be7.tar.bz2
go-tangerine-bbc777cf41dffea2fc63e0946e5ce3a7ddce1be7.tar.lz
go-tangerine-bbc777cf41dffea2fc63e0946e5ce3a7ddce1be7.tar.xz
go-tangerine-bbc777cf41dffea2fc63e0946e5ce3a7ddce1be7.tar.zst
go-tangerine-bbc777cf41dffea2fc63e0946e5ce3a7ddce1be7.zip
app: check nonce and balance in prepare payload
Diffstat (limited to 'core')
-rw-r--r--core/blockchain.go6
-rw-r--r--core/types/block.go2
2 files changed, 3 insertions, 5 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index e59c36653..d2999f926 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"
@@ -1620,10 +1619,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 b51cea811..68346acaa 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