Throw exception in a manner that matches behavior of nodes

See behavior of go-ethereum here: 80e5f50713/core/block_processor.go (L378)

See behavior of cpp-ethereum here: 09e5dbfa06/libethcore/Ethash.cpp (L99)
This commit is contained in:
David Dworken 2015-08-05 21:46:24 -04:00
parent 98100f472c
commit ce116681c5

View file

@ -126,7 +126,7 @@ func (self *minerApi) SetExtra(req *shared.Request) (interface{}, error) {
return nil, err return nil, err
} }
if uint64(len(args.Data)) > params.MaximumExtraDataSize.Uint64()*2 { if uint64(len(args.Data)) > params.MaximumExtraDataSize.Uint64() {
return false, fmt.Errorf("extra datasize can be no longer than %v bytes", params.MaximumExtraDataSize) return false, fmt.Errorf("extra datasize can be no longer than %v bytes", params.MaximumExtraDataSize)
} }