From caea305587ac389b475ea5479c54439ca1820177 Mon Sep 17 00:00:00 2001 From: antiochp <30642645+antiochp@users.noreply.github.com> Date: Mon, 19 Aug 2019 16:58:13 +0100 Subject: [PATCH] revert CbData changes mining node calls build_coinbase and this needs to be consistent with grin node --- api/src/foreign_rpc.rs | 4 +--- impls/src/test_framework/mod.rs | 2 +- libwallet/src/api_impl/types.rs | 5 ++--- libwallet/src/internal/updater.rs | 3 +-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/api/src/foreign_rpc.rs b/api/src/foreign_rpc.rs index 2028c11b..fef2d2dc 100644 --- a/api/src/foreign_rpc.rs +++ b/api/src/foreign_rpc.rs @@ -94,9 +94,7 @@ pub trait ForeignRpc { "kernel": { "excess": "08dfe86d732f2dd24bac36aa7502685221369514197c26d33fac03041d47e4b490", "excess_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841be02fa098c54c9bf638e0ee1ad5eb896caa11565f632be7b9cd65643ba371044f", - "features": "Coinbase", - "fee": "0", - "lock_height": "0" + "features": "Coinbase" }, "key_id": "0300000000000000000000000400000000", "output": { diff --git a/impls/src/test_framework/mod.rs b/impls/src/test_framework/mod.rs index 08fe970e..1328b06d 100644 --- a/impls/src/test_framework/mod.rs +++ b/impls/src/test_framework/mod.rs @@ -82,7 +82,7 @@ pub fn add_block_with_reward(chain: &Chain, txs: Vec<&Transaction>, reward: CbDa &prev, txs.into_iter().cloned().collect(), next_header_info.clone().difficulty, - (reward.output, TxKernel::from(&reward.kernel)), + (reward.output, reward.kernel), ) .unwrap(); b.header.timestamp = prev.timestamp + Duration::seconds(60); diff --git a/libwallet/src/api_impl/types.rs b/libwallet/src/api_impl/types.rs index d74aa65d..07e7f0af 100644 --- a/libwallet/src/api_impl/types.rs +++ b/libwallet/src/api_impl/types.rs @@ -14,11 +14,10 @@ //! Types specific to the wallet api, mostly argument serialization -use crate::grin_core::core::Output; +use crate::grin_core::core::{Output, TxKernel}; use crate::grin_core::libtx::secp_ser; use crate::grin_keychain::Identifier; use crate::grin_util::secp::pedersen; -use crate::slate_versions::v2::TxKernelV2; use crate::slate_versions::SlateVersion; use crate::types::OutputData; @@ -186,7 +185,7 @@ pub struct CbData { /// Output pub output: Output, /// Kernel - pub kernel: TxKernelV2, + pub kernel: TxKernel, /// Key Id pub key_id: Option, } diff --git a/libwallet/src/internal/updater.rs b/libwallet/src/internal/updater.rs index b9525151..3306afc6 100644 --- a/libwallet/src/internal/updater.rs +++ b/libwallet/src/internal/updater.rs @@ -29,7 +29,6 @@ use crate::grin_util as util; use crate::grin_util::secp::key::SecretKey; use crate::grin_util::secp::pedersen; use crate::internal::keys; -use crate::slate_versions::v2::TxKernelV2; use crate::types::{ NodeClient, OutputData, OutputStatus, TxLogEntry, TxLogEntryType, WalletBackend, WalletInfo, }; @@ -468,7 +467,7 @@ where Ok(CbData { output: out, - kernel: TxKernelV2::from(&kern), + kernel: kern, key_id: block_fees.key_id, }) }