diff --git a/api/src/handlers.rs b/api/src/handlers.rs
index b9ad55f5..f87ebe5f 100644
--- a/api/src/handlers.rs
+++ b/api/src/handlers.rs
@@ -134,7 +134,7 @@ impl OutputHandler {
// in the period between accepting the block and refreshing the wallet
if let Ok(block) = w(&self.chain).get_block(&header.hash()) {
let outputs = block
- .outputs
+ .outputs()
.iter()
.filter(|output| commitments.is_empty() || commitments.contains(&output.commit))
.map(|output| {
@@ -226,7 +226,8 @@ impl OutputHandler {
impl Handler for OutputHandler {
fn get(&self, req: Request
) -> ResponseFuture {
- match req.uri()
+ match req
+ .uri()
.path()
.trim_right_matches("/")
.rsplit("/")
@@ -362,7 +363,8 @@ impl Handler for TxHashSetHandler {
}
}
}
- match req.uri()
+ match req
+ .uri()
.path()
.trim_right()
.trim_right_matches("/")
@@ -418,7 +420,8 @@ pub struct PeerHandler {
impl Handler for PeerHandler {
fn get(&self, req: Request) -> ResponseFuture {
- if let Ok(addr) = req.uri()
+ if let Ok(addr) = req
+ .uri()
.path()
.trim_right_matches("/")
.rsplit("/")
@@ -604,7 +607,8 @@ fn check_block_param(input: &String) -> Result<(), Error> {
impl Handler for BlockHandler {
fn get(&self, req: Request) -> ResponseFuture {
- let el = req.uri()
+ let el = req
+ .uri()
.path()
.trim_right_matches("/")
.rsplit("/")
@@ -649,7 +653,8 @@ impl Handler for BlockHandler {
impl Handler for HeaderHandler {
fn get(&self, req: Request) -> ResponseFuture {
- let el = req.uri()
+ let el = req
+ .uri()
.path()
.trim_right_matches("/")
.rsplit("/")
@@ -736,8 +741,8 @@ where
info!(
LOGGER,
"Pushing transaction with {} inputs and {} outputs to pool.",
- tx.inputs.len(),
- tx.outputs.len()
+ tx.inputs().len(),
+ tx.outputs().len()
);
// Push to tx pool.
diff --git a/api/src/types.rs b/api/src/types.rs
index dcd768c8..fe006e8d 100644
--- a/api/src/types.rs
+++ b/api/src/types.rs
@@ -292,7 +292,8 @@ impl OutputPrintable {
}
pub fn range_proof(&self) -> Result {
- let proof_str = self.proof
+ let proof_str = self
+ .proof
.clone()
.ok_or_else(|| ser::Error::HexError(format!("output range_proof missing")))
.unwrap();
@@ -531,12 +532,12 @@ impl BlockPrintable {
include_proof: bool,
) -> BlockPrintable {
let inputs = block
- .inputs
+ .inputs()
.iter()
.map(|x| util::to_hex(x.commitment().0.to_vec()))
.collect();
let outputs = block
- .outputs
+ .outputs()
.iter()
.map(|output| {
OutputPrintable::from_output(
@@ -548,7 +549,7 @@ impl BlockPrintable {
})
.collect();
let kernels = block
- .kernels
+ .kernels()
.iter()
.map(|kernel| TxKernelPrintable::from_txkernel(kernel))
.collect();
@@ -581,11 +582,13 @@ impl CompactBlockPrintable {
chain: Arc,
) -> CompactBlockPrintable {
let block = chain.get_block(&cb.hash()).unwrap();
- let out_full = cb.out_full
+ let out_full = cb
+ .out_full
.iter()
.map(|x| OutputPrintable::from_output(x, chain.clone(), Some(&block.header), false))
.collect();
- let kern_full = cb.kern_full
+ let kern_full = cb
+ .kern_full
.iter()
.map(|x| TxKernelPrintable::from_txkernel(x))
.collect();
diff --git a/chain/src/chain.rs b/chain/src/chain.rs
index 6120b1ab..ce90523f 100644
--- a/chain/src/chain.rs
+++ b/chain/src/chain.rs
@@ -421,7 +421,7 @@ impl Chain {
let height = self.next_block_height()?;
let mut txhashset = self.txhashset.write().unwrap();
txhashset::extending_readonly(&mut txhashset, |extension| {
- extension.verify_coinbase_maturity(&tx.inputs, height)?;
+ extension.verify_coinbase_maturity(&tx.inputs(), height)?;
Ok(())
})
}
diff --git a/chain/src/pipe.rs b/chain/src/pipe.rs
index 35687ed3..5caea137 100644
--- a/chain/src/pipe.rs
+++ b/chain/src/pipe.rs
@@ -66,9 +66,9 @@ pub fn process_block(b: &Block, ctx: &mut BlockContext) -> Result