Fetch consensusBranchId from server

This commit is contained in:
Aditya Kulkarni
2019-09-25 17:45:25 -07:00
parent 3479dc345a
commit c1432a3810
4 changed files with 19 additions and 41 deletions

View File

@@ -41,6 +41,7 @@ pub struct LightClientConfig {
pub server : String,
pub chain_name : String,
pub sapling_activation_height : u64,
pub consensus_branch_id : String,
}
impl LightClientConfig {
@@ -724,7 +725,7 @@ impl LightClient {
pub fn do_send(&self, addr: &str, value: u64, memo: Option<String>) -> String {
info!("Creating transaction");
let rawtx = self.wallet.send_to_address(
u32::from_str_radix("2bb40e60", 16).unwrap(), // Blossom ID
u32::from_str_radix(&self.config.consensus_branch_id, 16).unwrap(), // Blossom ID
&self.sapling_spend, &self.sapling_output,
&addr, value, memo
);