revert CbData changes

mining node calls build_coinbase and this needs to be consistent with grin node
This commit is contained in:
antiochp 2019-08-19 16:58:13 +01:00
parent ec3d08a710
commit caea305587
No known key found for this signature in database
GPG key ID: 49CBDBCE8AB061C1
4 changed files with 5 additions and 9 deletions

View file

@ -94,9 +94,7 @@ pub trait ForeignRpc {
"kernel": { "kernel": {
"excess": "08dfe86d732f2dd24bac36aa7502685221369514197c26d33fac03041d47e4b490", "excess": "08dfe86d732f2dd24bac36aa7502685221369514197c26d33fac03041d47e4b490",
"excess_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841be02fa098c54c9bf638e0ee1ad5eb896caa11565f632be7b9cd65643ba371044f", "excess_sig": "8f07ddd5e9f5179cff19486034181ed76505baaad53e5d994064127b56c5841be02fa098c54c9bf638e0ee1ad5eb896caa11565f632be7b9cd65643ba371044f",
"features": "Coinbase", "features": "Coinbase"
"fee": "0",
"lock_height": "0"
}, },
"key_id": "0300000000000000000000000400000000", "key_id": "0300000000000000000000000400000000",
"output": { "output": {

View file

@ -82,7 +82,7 @@ pub fn add_block_with_reward(chain: &Chain, txs: Vec<&Transaction>, reward: CbDa
&prev, &prev,
txs.into_iter().cloned().collect(), txs.into_iter().cloned().collect(),
next_header_info.clone().difficulty, next_header_info.clone().difficulty,
(reward.output, TxKernel::from(&reward.kernel)), (reward.output, reward.kernel),
) )
.unwrap(); .unwrap();
b.header.timestamp = prev.timestamp + Duration::seconds(60); b.header.timestamp = prev.timestamp + Duration::seconds(60);

View file

@ -14,11 +14,10 @@
//! Types specific to the wallet api, mostly argument serialization //! 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_core::libtx::secp_ser;
use crate::grin_keychain::Identifier; use crate::grin_keychain::Identifier;
use crate::grin_util::secp::pedersen; use crate::grin_util::secp::pedersen;
use crate::slate_versions::v2::TxKernelV2;
use crate::slate_versions::SlateVersion; use crate::slate_versions::SlateVersion;
use crate::types::OutputData; use crate::types::OutputData;
@ -186,7 +185,7 @@ pub struct CbData {
/// Output /// Output
pub output: Output, pub output: Output,
/// Kernel /// Kernel
pub kernel: TxKernelV2, pub kernel: TxKernel,
/// Key Id /// Key Id
pub key_id: Option<Identifier>, pub key_id: Option<Identifier>,
} }

View file

@ -29,7 +29,6 @@ use crate::grin_util as util;
use crate::grin_util::secp::key::SecretKey; use crate::grin_util::secp::key::SecretKey;
use crate::grin_util::secp::pedersen; use crate::grin_util::secp::pedersen;
use crate::internal::keys; use crate::internal::keys;
use crate::slate_versions::v2::TxKernelV2;
use crate::types::{ use crate::types::{
NodeClient, OutputData, OutputStatus, TxLogEntry, TxLogEntryType, WalletBackend, WalletInfo, NodeClient, OutputData, OutputStatus, TxLogEntry, TxLogEntryType, WalletBackend, WalletInfo,
}; };
@ -468,7 +467,7 @@ where
Ok(CbData { Ok(CbData {
output: out, output: out,
kernel: TxKernelV2::from(&kern), kernel: kern,
key_id: block_fees.key_id, key_id: block_fees.key_id,
}) })
} }