mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-12-03 20:33:59 +01:00
Convert node client to use V2 Node API (#329)
* add beginnings of jsonrpc node client, get_chain_tip implementation * version info and outputs from node * return async split up of get_output requests * add and test get kernel functionality * height range to pmmr indices * test fixes * outputs by pmmr index
This commit is contained in:
@@ -18,8 +18,6 @@ use uuid::Uuid;
|
||||
|
||||
use crate::grin_core::core::hash::Hashed;
|
||||
use crate::grin_core::core::Transaction;
|
||||
use crate::grin_core::ser;
|
||||
use crate::grin_util;
|
||||
use crate::grin_util::secp::key::SecretKey;
|
||||
use crate::grin_util::Mutex;
|
||||
use crate::util::OnionV3Address;
|
||||
@@ -28,7 +26,7 @@ use crate::api_impl::owner_updater::StatusMessage;
|
||||
use crate::grin_keychain::{Identifier, Keychain};
|
||||
use crate::internal::{keys, scan, selection, tx, updater};
|
||||
use crate::slate::{PaymentInfo, Slate};
|
||||
use crate::types::{AcctPathMapping, NodeClient, TxLogEntry, TxWrapper, WalletBackend, WalletInfo};
|
||||
use crate::types::{AcctPathMapping, NodeClient, TxLogEntry, WalletBackend, WalletInfo};
|
||||
use crate::{
|
||||
address, wallet_lock, InitTxArgs, IssueInvoiceTxArgs, NodeHeightResult, OutputCommitMapping,
|
||||
PaymentProof, ScannedBlockInfo, TxLogEntryType, WalletInitStatus, WalletInst, WalletLCProvider,
|
||||
@@ -632,8 +630,7 @@ pub fn post_tx<'a, C>(client: &C, tx: &Transaction, fluff: bool) -> Result<(), E
|
||||
where
|
||||
C: NodeClient + 'a,
|
||||
{
|
||||
let tx_hex = grin_util::to_hex(ser::ser_vec(tx, ser::ProtocolVersion(1)).unwrap());
|
||||
let res = client.post_tx(&TxWrapper { tx_hex: tx_hex }, fluff);
|
||||
let res = client.post_tx(tx, fluff);
|
||||
if let Err(e) = res {
|
||||
error!("api: post_tx: failed with error: {}", e);
|
||||
Err(e)
|
||||
|
||||
Reference in New Issue
Block a user