diff options
Diffstat (limited to 'core/blockchain.go')
-rw-r--r-- | core/blockchain.go | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/core/blockchain.go b/core/blockchain.go index 470f7ae28..1b3b22e5e 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -270,13 +270,15 @@ func (bc *BlockChain) AddConfirmedBlock(block *coreTypes.Block) error { bc.confirmedBlockInitMu.Unlock() var transactions types.Transactions - err := rlp.Decode(bytes.NewReader(block.Payload), &transactions) - if err != nil { - return err - } - _, err = types.GlobalSigCache.Add(types.NewEIP155Signer(bc.Config().ChainID), transactions) - if err != nil { - return err + if len(block.Payload) != 0 { + err := rlp.Decode(bytes.NewReader(block.Payload), &transactions) + if err != nil { + return err + } + _, err = types.GlobalSigCache.Add(types.NewEIP155Signer(bc.Config().ChainID), transactions) + if err != nil { + return err + } } addressMap := map[common.Address]struct{}{} |