Skip to content

Commit

Permalink
revert CbData changes
Browse files Browse the repository at this point in the history
mining node calls build_coinbase and this needs to be consistent with grin node
  • Loading branch information
antiochp committed Aug 19, 2019
1 parent ec3d08a commit caea305
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
4 changes: 1 addition & 3 deletions api/src/foreign_rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion impls/src/test_framework/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 2 additions & 3 deletions libwallet/src/api_impl/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -186,7 +185,7 @@ pub struct CbData {
/// Output
pub output: Output,
/// Kernel
pub kernel: TxKernelV2,
pub kernel: TxKernel,
/// Key Id
pub key_id: Option<Identifier>,
}
Expand Down
3 changes: 1 addition & 2 deletions libwallet/src/internal/updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down Expand Up @@ -468,7 +467,7 @@ where

Ok(CbData {
output: out,
kernel: TxKernelV2::from(&kern),
kernel: kern,
key_id: block_fees.key_id,
})
}
Expand Down

0 comments on commit caea305

Please sign in to comment.