Validating senders balance before importing transaction to queue

This commit is contained in:
Tomasz Drwięga
2016-03-16 10:40:33 +01:00
parent be32e79a7a
commit fdba8de600
7 changed files with 94 additions and 47 deletions

View File

@@ -70,7 +70,14 @@ pub enum TransactionError {
/// Minimal expected gas price
minimal: U256,
/// Transaction gas price
got: U256
got: U256,
},
/// Sender doesn't have enough funds to pay for this transaction
InsufficientBalance {
/// Senders balance
balance: U256,
/// Transaction cost
cost: U256,
},
/// Transaction's gas limit (aka gas) is invalid.
InvalidGasLimit(OutOfBounds<U256>),