From 5352280169edf990237b0ebac0ca0c6939578f4f Mon Sep 17 00:00:00 2001 From: canonbrother Date: Wed, 28 Sep 2022 12:46:07 +0800 Subject: [PATCH] rename DNC to DFC --- meta/meta-consensus/rpc/src/lib.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/meta/meta-consensus/rpc/src/lib.rs b/meta/meta-consensus/rpc/src/lib.rs index 88fd6577..fa0ed55f 100644 --- a/meta/meta-consensus/rpc/src/lib.rs +++ b/meta/meta-consensus/rpc/src/lib.rs @@ -27,14 +27,14 @@ use serde::{Deserialize, Serialize}; mod tests; #[derive(Debug, Default, Serialize, Deserialize)] -pub struct DNCTx { +pub struct DFCTx { from: String, to: String, amount: i64, signature: String, } -// NOTE(surangap): keeping DMCTx as separate struct from DNCTx for now +// NOTE(surangap): keeping DMCTx as separate struct from DFCTx for now #[derive(Debug, Default, Serialize, Deserialize)] pub struct DMCTx { from: String, @@ -55,13 +55,13 @@ where fn get_block(&self, at: Option>) -> RpcResult>; #[method(name = "metaConsensusRpc_mintBlock")] - async fn mint_block(&self, dnc_txs: Vec) -> RpcResult<(Vec, Vec)>; + async fn mint_block(&self, dfc_txs: Vec) -> RpcResult<(Vec, Vec)>; #[method(name = "metaConsensusRpc_connectBlock")] async fn connect_block( &self, dmc_payload: Vec, - dnc_txs: Vec, + dfc_txs: Vec, ) -> RpcResult<(bool, Vec)>; } @@ -135,8 +135,8 @@ where } } - async fn mint_block(&self, dnc_txs: Vec) -> RpcResult<(Vec, Vec)> { - //TODO(surangap): validate the dnc_txs. do the account balance changes accordingly + async fn mint_block(&self, dfc_txs: Vec) -> RpcResult<(Vec, Vec)> { + //TODO(surangap): validate the dfc_txs. do the account balance changes accordingly // send command to mint the next block let sink = self.command_sink.clone(); @@ -171,7 +171,7 @@ where async fn connect_block( &self, dmc_payload: Vec, - dnc_txs: Vec, + dfc_txs: Vec, ) -> RpcResult<(bool, Vec)> { // decode the signed block let decoded = SignedBlock::decode(&mut &dmc_payload[..]);