mirror of
https://github.com/romanz/electrs.git
synced 2024-11-19 01:43:29 +01:00
Support latest bitcoind mempool entry vsize field name
It was changed by https://github.com/bitcoin/bitcoin/pull/15637.
This commit is contained in:
parent
e9c06d816a
commit
1167cbfb04
@ -568,9 +568,10 @@ impl Daemon {
|
||||
* 100_000_000f64) as u64;
|
||||
let vsize = entry
|
||||
.get("size")
|
||||
.chain_err(|| "missing size")?
|
||||
.or_else(|| entry.get("vsize")) // (https://github.com/bitcoin/bitcoin/pull/15637)
|
||||
.chain_err(|| "missing vsize")?
|
||||
.as_u64()
|
||||
.chain_err(|| "non-integer size")? as u32;
|
||||
.chain_err(|| "non-integer vsize")? as u32;
|
||||
Ok(MempoolEntry::new(fee, vsize))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user