Kernel lookup api method (#3000)

* Kernel lookup api

* Min and max height parameters, scan backwards

* Return null instead of 404 if kernel not found

* Return TxKernel instead of TxKernelPrintable

* Update description of KernelHandler
This commit is contained in:
jaspervdm
2019-08-30 11:03:12 +02:00
committed by Antioch Peverell
parent d36a0b29ef
commit 30156cdcf9
5 changed files with 173 additions and 3 deletions
+8 -1
View File
@@ -17,7 +17,7 @@ use std::sync::Arc;
use crate::chain;
use crate::core::core::hash::Hashed;
use crate::core::core::merkle_proof::MerkleProof;
use crate::core::core::KernelFeatures;
use crate::core::core::{KernelFeatures, TxKernel};
use crate::core::{core, ser};
use crate::p2p;
use crate::util;
@@ -699,6 +699,13 @@ pub struct OutputListing {
pub outputs: Vec<OutputPrintable>,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct LocatedTxKernel {
pub tx_kernel: TxKernel,
pub height: u64,
pub mmr_index: u64,
}
#[derive(Serialize, Deserialize)]
pub struct PoolInfo {
/// Size of the pool