commit 6ac06e7f52a197e2b46e08adc9c129076af3158d
parent 3b39a252ed1c44a4f3586e045699095b4c13e002
Author: Antoine A <>
Date: Wed, 23 Feb 2022 15:26:47 +0100
Revert broken pipe fix
Diffstat:
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/btc-wire/src/rpc.rs b/btc-wire/src/rpc.rs
@@ -373,14 +373,8 @@ impl Rpc {
/* ----- Watcher ----- */
/// Block until a new block is mined
- pub fn wait_for_new_block(&mut self) -> Result<()> {
- let init_height = self.get_blockchain_info()?.blocks;
- loop {
- let info: BlockInfo = self.call("waitfornewblock", &[10])?;
- if info.blocks != init_height {
- return Ok(());
- }
- }
+ pub fn wait_for_new_block(&mut self) -> Result<Nothing> {
+ self.call("waitfornewblock", &[0])
}
/// List new and removed transaction since a block
@@ -405,11 +399,6 @@ pub struct BlockchainInfo {
pub best_block_hash: BlockHash,
}
-#[derive(Clone, Debug, serde::Deserialize)]
-struct BlockInfo {
- pub blocks: u64,
-}
-
#[derive(Debug, serde::Deserialize)]
pub struct BumpResult {
pub txid: Txid,