fix(txpool): differentiate pool error variants (#2008)

This commit is contained in:
Matthias Seitz
2023-03-28 18:28:24 +02:00
committed by GitHub
parent 7bd2576049
commit b55b2d6182
4 changed files with 60 additions and 10 deletions

View File

@ -341,7 +341,7 @@ impl From<PoolError> for RpcPoolError {
fn from(err: PoolError) -> RpcPoolError {
match err {
PoolError::ReplacementUnderpriced(_) => RpcPoolError::ReplaceUnderpriced,
PoolError::ProtocolFeeCapTooLow(_, _) => RpcPoolError::Underpriced,
PoolError::FeeCapBelowMinimumProtocolFeeCap(_, _) => RpcPoolError::Underpriced,
PoolError::SpammerExceededCapacity(_, _) => RpcPoolError::TxPoolOverflow,
PoolError::DiscardedOnInsert(_) => RpcPoolError::TxPoolOverflow,
PoolError::InvalidTransaction(_, err) => err.into(),