mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
build_tx: added cashier vec to State
This commit is contained in:
@@ -5,6 +5,7 @@ use drk::{
|
||||
crypto::{
|
||||
load_params, merkle::CommitmentTree, save_params, setup_mint_prover, setup_spend_prover,
|
||||
},
|
||||
serial::deserialize,
|
||||
state::state_transition,
|
||||
tx,
|
||||
util::{expand_path, join_config_path},
|
||||
@@ -27,6 +28,14 @@ async fn main() -> Result<()> {
|
||||
let config_cashier: CashierdConfig =
|
||||
Config::<CashierdConfig>::load(join_config_path(&PathBuf::from("cashierd.toml"))?)?;
|
||||
|
||||
let mut public_keys = Vec::new();
|
||||
|
||||
for cashier in config.clone().cashiers {
|
||||
let cashier_public: jubjub::SubgroupPoint =
|
||||
deserialize(&bs58::decode(cashier.cashier_public_key).into_vec()?)?;
|
||||
public_keys.push(cashier_public);
|
||||
}
|
||||
|
||||
let rocks = Rocks::new(expand_path(&config.database_path.clone())?.as_path())?;
|
||||
|
||||
let merkle_roots = RocksColumn::<columns::MerkleRoots>::new(rocks.clone());
|
||||
@@ -122,6 +131,7 @@ async fn main() -> Result<()> {
|
||||
mint_pvk,
|
||||
spend_pvk,
|
||||
wallet,
|
||||
public_keys,
|
||||
}));
|
||||
|
||||
//
|
||||
|
||||
@@ -402,7 +402,9 @@ pub struct State {
|
||||
pub mint_pvk: groth16::PreparedVerifyingKey<Bls12>,
|
||||
// Spend verifying key used by ZK
|
||||
pub spend_pvk: groth16::PreparedVerifyingKey<Bls12>,
|
||||
// Pointer to sql database
|
||||
pub wallet: WalletPtr,
|
||||
// List of cashier public keys
|
||||
pub public_keys: Vec<jubjub::SubgroupPoint>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user