diff options
Diffstat (limited to 'light')
-rw-r--r-- | light/state_object.go | 2 | ||||
-rw-r--r-- | light/txpool.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/light/state_object.go b/light/state_object.go index 03d4868cd..d023270d5 100644 --- a/light/state_object.go +++ b/light/state_object.go @@ -202,7 +202,7 @@ func (self *StateObject) Copy() *StateObject { // empty returns whether the account is considered empty. func (self *StateObject) empty() bool { - return self.nonce == 0 && self.balance.BitLen() == 0 && bytes.Equal(self.codeHash, emptyCodeHash) + return self.nonce == 0 && self.balance.Sign() == 0 && bytes.Equal(self.codeHash, emptyCodeHash) } // Balance returns the account balance diff --git a/light/txpool.go b/light/txpool.go index 365f02d25..ecd6cfa26 100644 --- a/light/txpool.go +++ b/light/txpool.go @@ -365,7 +365,7 @@ func (pool *TxPool) validateTx(ctx context.Context, tx *types.Transaction) error // Transactions can't be negative. This may never happen // using RLP decoded transactions but may occur if you create // a transaction using the RPC for example. - if tx.Value().Cmp(common.Big0) < 0 { + if tx.Value().Sign() < 0 { return core.ErrNegativeValue } |