mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-25 17:24:47 -07:00
global: snapshot
This commit is contained in:
@@ -46,6 +46,7 @@ impl<T> AddressGroups<Filtered<T>> {
|
||||
}
|
||||
|
||||
impl<T> From<AddressGroups<T>> for AddressGroups<Filtered<T>> {
|
||||
#[inline]
|
||||
fn from(value: AddressGroups<T>) -> Self {
|
||||
Self {
|
||||
amount_range: ByAmountRange::from(value.amount_range),
|
||||
|
||||
@@ -231,6 +231,7 @@ impl<T> ByAddressType<Filtered<T>> {
|
||||
}
|
||||
|
||||
impl<T> From<ByAddressType<T>> for ByAddressType<Filtered<T>> {
|
||||
#[inline]
|
||||
fn from(value: ByAddressType<T>) -> Self {
|
||||
Self {
|
||||
p2pk65: (Filter::Type(OutputType::P2PK65), value.p2pk65).into(),
|
||||
|
||||
@@ -30,6 +30,7 @@ pub struct ByAgeRange<T> {
|
||||
}
|
||||
|
||||
impl<T> From<ByAgeRange<T>> for ByAgeRange<Filtered<T>> {
|
||||
#[inline]
|
||||
fn from(value: ByAgeRange<T>) -> Self {
|
||||
Self {
|
||||
up_to_1d: (Filter::LowerThan(1), value.up_to_1d).into(),
|
||||
|
||||
@@ -26,6 +26,7 @@ pub struct ByAmountRange<T> {
|
||||
}
|
||||
|
||||
impl<T> From<ByAmountRange<T>> for ByAmountRange<Filtered<T>> {
|
||||
#[inline]
|
||||
fn from(value: ByAmountRange<T>) -> Self {
|
||||
#[allow(clippy::inconsistent_digit_grouping)]
|
||||
Self {
|
||||
|
||||
@@ -14,6 +14,7 @@ pub struct ByEpoch<T> {
|
||||
}
|
||||
|
||||
impl<T> From<ByEpoch<T>> for ByEpoch<Filtered<T>> {
|
||||
#[inline]
|
||||
fn from(value: ByEpoch<T>) -> Self {
|
||||
Self {
|
||||
_0: (Filter::Epoch(HalvingEpoch::new(0)), value._0).into(),
|
||||
|
||||
@@ -63,6 +63,7 @@ impl<T> ByGreatEqualAmount<Filtered<T>> {
|
||||
}
|
||||
|
||||
impl<T> From<ByGreatEqualAmount<T>> for ByGreatEqualAmount<Filtered<T>> {
|
||||
#[inline]
|
||||
fn from(value: ByGreatEqualAmount<T>) -> Self {
|
||||
Self {
|
||||
_1sat: (Filter::GreaterOrEqual(Sats::_1.into()), value._1sat).into(),
|
||||
|
||||
@@ -63,6 +63,7 @@ impl<T> ByLowerThanAmount<Filtered<T>> {
|
||||
}
|
||||
|
||||
impl<T> From<ByLowerThanAmount<T>> for ByLowerThanAmount<Filtered<T>> {
|
||||
#[inline]
|
||||
fn from(value: ByLowerThanAmount<T>) -> Self {
|
||||
Self {
|
||||
_10sats: (Filter::LowerThan(Sats::_10.into()), value._10sats).into(),
|
||||
|
||||
@@ -78,6 +78,7 @@ impl<T> ByMaxAge<Filtered<T>> {
|
||||
}
|
||||
|
||||
impl<T> From<ByMaxAge<T>> for ByMaxAge<Filtered<T>> {
|
||||
#[inline]
|
||||
fn from(value: ByMaxAge<T>) -> Self {
|
||||
Self {
|
||||
_1w: (Filter::LowerThan(7), value._1w).into(),
|
||||
|
||||
@@ -79,6 +79,7 @@ impl<T> ByMinAge<Filtered<T>> {
|
||||
}
|
||||
|
||||
impl<T> From<ByMinAge<T>> for ByMinAge<Filtered<T>> {
|
||||
#[inline]
|
||||
fn from(value: ByMinAge<T>) -> Self {
|
||||
Self {
|
||||
_1d: (Filter::GreaterOrEqual(1), value._1d).into(),
|
||||
|
||||
@@ -114,6 +114,7 @@ impl<T> BySpendableType<Filtered<T>> {
|
||||
}
|
||||
|
||||
impl<T> From<BySpendableType<T>> for BySpendableType<Filtered<T>> {
|
||||
#[inline]
|
||||
fn from(value: BySpendableType<T>) -> Self {
|
||||
Self {
|
||||
p2pk65: (Filter::Type(OutputType::P2PK65), value.p2pk65).into(),
|
||||
|
||||
@@ -23,6 +23,7 @@ impl<T> ByTerm<Filtered<T>> {
|
||||
}
|
||||
|
||||
impl<T> From<ByTerm<T>> for ByTerm<Filtered<T>> {
|
||||
#[inline]
|
||||
fn from(value: ByTerm<T>) -> Self {
|
||||
Self {
|
||||
short: (Filter::LowerThan(5 * 30), value.short).into(),
|
||||
|
||||
@@ -71,6 +71,7 @@ impl<T> Filtered<T> {
|
||||
}
|
||||
|
||||
impl<T> From<(Filter, T)> for Filtered<T> {
|
||||
#[inline]
|
||||
fn from(value: (Filter, T)) -> Self {
|
||||
Self(value.0, value.1)
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ impl<T> UTXOGroups<Filtered<T>> {
|
||||
}
|
||||
|
||||
impl<T> From<UTXOGroups<T>> for UTXOGroups<Filtered<T>> {
|
||||
#[inline]
|
||||
fn from(value: UTXOGroups<T>) -> Self {
|
||||
Self {
|
||||
all: (Filter::All, value.all).into(),
|
||||
|
||||
Reference in New Issue
Block a user