File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -636,7 +636,10 @@ fn get_history(
636636) -> Result < Vec < ( Txid , Option < BlockId > ) > > {
637637 // to avoid silently trunacting history entries, ask for one extra more than the limit and fail if it exists
638638 let history_txids = query. history_txids ( scripthash, txs_limit + 1 ) ;
639- ensure ! ( history_txids. len( ) <= txs_limit, ErrorKind :: TooPopular ) ;
639+ ensure ! (
640+ history_txids. len( ) <= txs_limit,
641+ ErrorKind :: TooManyTxs ( txs_limit)
642+ ) ;
640643 Ok ( history_txids)
641644}
642645
Original file line number Diff line number Diff line change @@ -14,9 +14,14 @@ error_chain! {
1414 display( "Iterrupted by signal {}" , sig)
1515 }
1616
17- TooPopular {
18- description( "Too many history entries" )
19- display( "Too many history entries" )
17+ TooManyUtxos ( limit: usize ) {
18+ description( "Too many unspent transaction outputs. Contact support to raise limits." )
19+ display( "Too many unspent transaction outputs (>{}). Contact support to raise limits." , limit)
20+ }
21+
22+ TooManyTxs ( limit: usize ) {
23+ description( "Too many history transactions. Contact support to raise limits." )
24+ display( "Too many history transactions (>{}). Contact support to raise limits." , limit)
2025 }
2126
2227 #[ cfg( feature = "electrum-discovery" ) ]
Original file line number Diff line number Diff line change @@ -671,7 +671,7 @@ impl ChainQuery {
671671
672672 // abort if the utxo set size excedees the limit at any point in time
673673 if utxos. len ( ) > limit {
674- bail ! ( ErrorKind :: TooPopular )
674+ bail ! ( ErrorKind :: TooManyUtxos ( limit ) )
675675 }
676676 }
677677
You can’t perform that action at this time.
0 commit comments