diff options
author | Felix Lange <fjl@twurst.com> | 2015-03-20 21:01:35 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-03-20 21:01:35 +0800 |
commit | 28ddc16a9b5779b6b31036e8248ed8457de7b443 (patch) | |
tree | 7508db500151bdaf0ebed726286f823e67993103 /core/types/common.go | |
parent | c161d73d429ef421cdb9c75b743c16d72aa8a89a (diff) | |
parent | 01ff0b3176e6d83dcc5e6716f04301de71e3fc9e (diff) | |
download | go-tangerine-28ddc16a9b5779b6b31036e8248ed8457de7b443.tar go-tangerine-28ddc16a9b5779b6b31036e8248ed8457de7b443.tar.gz go-tangerine-28ddc16a9b5779b6b31036e8248ed8457de7b443.tar.bz2 go-tangerine-28ddc16a9b5779b6b31036e8248ed8457de7b443.tar.lz go-tangerine-28ddc16a9b5779b6b31036e8248ed8457de7b443.tar.xz go-tangerine-28ddc16a9b5779b6b31036e8248ed8457de7b443.tar.zst go-tangerine-28ddc16a9b5779b6b31036e8248ed8457de7b443.zip |
Merge remote-tracking branch 'ethereum/conversion' into conversion
Diffstat (limited to 'core/types/common.go')
-rw-r--r-- | core/types/common.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/core/types/common.go b/core/types/common.go index ace9c2c4b..ce1090919 100644 --- a/core/types/common.go +++ b/core/types/common.go @@ -1,14 +1,16 @@ package types import ( - "fmt" "math/big" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/state" + + "fmt" ) type BlockProcessor interface { - Process(*Block) (*big.Int, error) + Process(*Block) (*big.Int, state.Logs, error) } const bloomLength = 256 @@ -26,10 +28,7 @@ func (b *Bloom) SetBytes(d []byte) { panic(fmt.Sprintf("bloom bytes too big %d %d", len(b), len(d))) } - // reverse loop - for i := len(d) - 1; i >= 0; i-- { - b[bloomLength-len(d)+i] = b[i] - } + copy(b[bloomLength-len(d):], d) } func (b Bloom) Big() *big.Int { |