Small rename

This commit is contained in:
Tomasz Drwięga 2016-04-18 13:35:19 +02:00
parent 881678b613
commit 2812f8cae6
2 changed files with 3 additions and 3 deletions

View File

@ -71,7 +71,7 @@ pub enum TransactionError {
Old,
/// Transaction has too low fee
/// (there is already a transaction with the same sender-nonce but higher gas price)
TooCheap,
TooCheapToReplace,
/// Transaction was not imported to the queue because limit has been reached.
LimitReached,
/// Transaction's gas price is below threshold.

View File

@ -96,7 +96,7 @@ use ethcore::error::{Error, TransactionError};
macro_rules! check_too_cheap {
($is_in:expr) => {
if !($is_in) {
return Err(TransactionError::TooCheap);
return Err(TransactionError::TooCheapToReplace);
}
}
}
@ -856,7 +856,7 @@ mod test {
let res = txq.add(tx2.clone(), &default_nonce);
// and then there should be only one transaction in current (the one with higher gas_price)
assert_eq!(unwrap_tx_err(res), TransactionError::TooCheap);
assert_eq!(unwrap_tx_err(res), TransactionError::TooCheapToReplace);
assert_eq!(txq.status().pending, 1);
assert_eq!(txq.status().future, 0);
assert_eq!(txq.current.by_priority.len(), 1);