remove duplicate is_empty
from DerivationAdditions
This commit is contained in:
parent
81c7613391
commit
f5074ee3ae
@ -46,11 +46,6 @@ pub use txout_index::*;
|
|||||||
pub struct DerivationAdditions<K>(pub BTreeMap<K, u32>);
|
pub struct DerivationAdditions<K>(pub BTreeMap<K, u32>);
|
||||||
|
|
||||||
impl<K> DerivationAdditions<K> {
|
impl<K> DerivationAdditions<K> {
|
||||||
/// Returns whether the additions are empty.
|
|
||||||
pub fn is_empty(&self) -> bool {
|
|
||||||
self.0.is_empty()
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get the inner map of the keychain to its new derivation index.
|
/// Get the inner map of the keychain to its new derivation index.
|
||||||
pub fn as_inner(&self) -> &BTreeMap<K, u32> {
|
pub fn as_inner(&self) -> &BTreeMap<K, u32> {
|
||||||
&self.0
|
&self.0
|
||||||
@ -72,6 +67,7 @@ impl<K: Ord> Append for DerivationAdditions<K> {
|
|||||||
self.0.append(&mut other.0);
|
self.0.append(&mut other.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns whether the additions are empty.
|
||||||
fn is_empty(&self) -> bool {
|
fn is_empty(&self) -> bool {
|
||||||
self.0.is_empty()
|
self.0.is_empty()
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ mod common;
|
|||||||
use bdk_chain::{
|
use bdk_chain::{
|
||||||
collections::BTreeMap,
|
collections::BTreeMap,
|
||||||
keychain::{DerivationAdditions, KeychainTxOutIndex},
|
keychain::{DerivationAdditions, KeychainTxOutIndex},
|
||||||
|
Append,
|
||||||
};
|
};
|
||||||
|
|
||||||
use bitcoin::{secp256k1::Secp256k1, OutPoint, Script, Transaction, TxOut};
|
use bitcoin::{secp256k1::Secp256k1, OutPoint, Script, Transaction, TxOut};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user