mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 12:46:44 +00:00
fix block rlp decoding
This commit is contained in:
parent
08dd3f0f20
commit
d50f33d183
1 changed files with 3 additions and 3 deletions
|
|
@ -103,9 +103,9 @@ func NewBlockWithHeader(header *Header) *Block {
|
||||||
|
|
||||||
func (self *Block) DecodeRLP(s *rlp.Stream) error {
|
func (self *Block) DecodeRLP(s *rlp.Stream) error {
|
||||||
var extblock struct {
|
var extblock struct {
|
||||||
Header
|
Header *Header
|
||||||
Txs []*Transaction
|
Txs []*Transaction
|
||||||
Uncles *Header
|
Uncles []*Header
|
||||||
TD *big.Int // optional
|
TD *big.Int // optional
|
||||||
}
|
}
|
||||||
if err := s.Decode(&extblock); err != nil {
|
if err := s.Decode(&extblock); err != nil {
|
||||||
|
|
@ -114,7 +114,7 @@ func (self *Block) DecodeRLP(s *rlp.Stream) error {
|
||||||
self.header = extblock.Header
|
self.header = extblock.Header
|
||||||
self.uncles = extblock.Uncles
|
self.uncles = extblock.Uncles
|
||||||
self.transactions = extblock.Txs
|
self.transactions = extblock.Txs
|
||||||
self.TD = extblock.TD
|
self.Td = extblock.TD
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue