Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ and this library adheres to Rust's notion of

## Unreleased
- [943] Zallet regtest fixes
- [1065] Move functionality to BlockChainSource: t-address rpcs

### Added
### Added
- `zaino-state::chain_index::source::BlockchainSource` and
`zaino-state::chain_index::ChainIndex` now expose transparent-address query
methods for deltas, balances, txids, and UTXOs.
### Changed
- `JsonRpSeeConnector::get_tree_state` now returns a `GetTreestateResponse`
whose `sapling` and `orchard` fields are optional. In regtest mode, these
Expand Down
49 changes: 25 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions packages/zaino-fetch/src/jsonrpsee/response/address_deltas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,30 @@ pub struct AddressDelta {
}

impl AddressDelta {
/// Creates a transparent address delta from already-indexed address-history data.
///
/// This is used by backing stores and test sources that already know the
/// address, value, transaction location, and input/output index. It avoids
/// forcing those implementations to build partial `TransactionObject`
/// values solely to immediately decompose them again.
pub fn new(
satoshis: i64,
txid: String,
index: u32,
height: u32,
address: String,
block_index: Option<u32>,
) -> Self {
Self {
satoshis,
txid,
index,
height,
address,
block_index,
}
}

/// Create a delta from a transaction input (spend - negative value)
pub fn from_input(
input: &Input,
Expand Down
16 changes: 16 additions & 0 deletions packages/zaino-state/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ and this library adheres to Rust's notion of
- `BlockIndex::try_from_wire(proto::BlockId) -> Result<Self, WireBlockIdError>`
- new error enum `WireBlockIdError` (`HashWrongLength`, `HeightOverflow`)
- `local_cache::compact_block_with_pool_types`
- `source::BlockchainSource` and implementors now expose transparent-address
methods:
- `get_address_deltas`
- `get_address_balance`
- `get_address_txids`
- `get_address_utxos`
- `ChainIndex` and `NodeBackedChainIndexSubscriber` now expose transparent-address
query methods:
- `get_address_deltas`
- `get_address_balance`
- `get_address_txids`
- `get_address_utxos`
### Changed
- `get_mempool_tx` now takes `GetMempoolTxRequest` as parameter
- `chain_index::finalised_state`
Expand All @@ -54,6 +66,10 @@ and this library adheres to Rust's notion of
`chain_index::types::BlockIndex` (was briefly `non_finalized_state::BlockIdent`
earlier in the same unreleased cycle); its inner field is now named `hash`
(previously `blockhash`), and it gains `Eq`/`Hash` derives.
- `FetchService` and `StateService` now serve the get_raw_transaction RPC through
`ChainIndex`.
- `FetchService` and `StateService` now serve the transparent-address RPCs through
`ChainIndex`.

### Deprecated
- `GetTaddressTxids` is replaced by `GetTaddressTransactions`
Expand Down
Loading
Loading