diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-09-29 00:27:31 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-10-19 15:03:09 +0800 |
commit | f186b390182da7af368e7a5a1e9eff8d690b7414 (patch) | |
tree | feb1410fe848dae9eed22c585bc0ebaab713f5a1 /core/types | |
parent | c33cc382b3561ca91871111933f81653bfd8532f (diff) | |
download | go-tangerine-f186b390182da7af368e7a5a1e9eff8d690b7414.tar go-tangerine-f186b390182da7af368e7a5a1e9eff8d690b7414.tar.gz go-tangerine-f186b390182da7af368e7a5a1e9eff8d690b7414.tar.bz2 go-tangerine-f186b390182da7af368e7a5a1e9eff8d690b7414.tar.lz go-tangerine-f186b390182da7af368e7a5a1e9eff8d690b7414.tar.xz go-tangerine-f186b390182da7af368e7a5a1e9eff8d690b7414.tar.zst go-tangerine-f186b390182da7af368e7a5a1e9eff8d690b7414.zip |
eth/downloader: add fast and light sync strategies
Diffstat (limited to 'core/types')
-rw-r--r-- | core/types/block.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/types/block.go b/core/types/block.go index f7baa2175..c4377ffa1 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -172,8 +172,8 @@ type storageblock struct { } var ( - emptyRootHash = DeriveSha(Transactions{}) - emptyUncleHash = CalcUncleHash(nil) + EmptyRootHash = DeriveSha(Transactions{}) + EmptyUncleHash = CalcUncleHash(nil) ) // NewBlock creates a new block. The input data is copied, @@ -188,7 +188,7 @@ func NewBlock(header *Header, txs []*Transaction, uncles []*Header, receipts []* // TODO: panic if len(txs) != len(receipts) if len(txs) == 0 { - b.header.TxHash = emptyRootHash + b.header.TxHash = EmptyRootHash } else { b.header.TxHash = DeriveSha(Transactions(txs)) b.transactions = make(Transactions, len(txs)) @@ -196,7 +196,7 @@ func NewBlock(header *Header, txs []*Transaction, uncles []*Header, receipts []* } if len(receipts) == 0 { - b.header.ReceiptHash = emptyRootHash + b.header.ReceiptHash = EmptyRootHash } else { b.header.ReceiptHash = DeriveSha(Receipts(receipts)) b.header.Bloom = CreateBloom(receipts) @@ -205,7 +205,7 @@ func NewBlock(header *Header, txs []*Transaction, uncles []*Header, receipts []* } if len(uncles) == 0 { - b.header.UncleHash = emptyUncleHash + b.header.UncleHash = EmptyUncleHash } else { b.header.UncleHash = CalcUncleHash(uncles) b.uncles = make([]*Header, len(uncles)) |