Skip to content
This repository was archived by the owner on Aug 24, 2023. It is now read-only.

Commit 5352280

Browse files
committed
rename DNC to DFC
1 parent 90e5b28 commit 5352280

File tree

1 file changed

+7
-7
lines changed
  • meta/meta-consensus/rpc/src

1 file changed

+7
-7
lines changed

meta/meta-consensus/rpc/src/lib.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ use serde::{Deserialize, Serialize};
2727
mod tests;
2828

2929
#[derive(Debug, Default, Serialize, Deserialize)]
30-
pub struct DNCTx {
30+
pub struct DFCTx {
3131
from: String,
3232
to: String,
3333
amount: i64,
3434
signature: String,
3535
}
3636

37-
// NOTE(surangap): keeping DMCTx as separate struct from DNCTx for now
37+
// NOTE(surangap): keeping DMCTx as separate struct from DFCTx for now
3838
#[derive(Debug, Default, Serialize, Deserialize)]
3939
pub struct DMCTx {
4040
from: String,
@@ -55,13 +55,13 @@ where
5555
fn get_block(&self, at: Option<NumberFor<Block>>) -> RpcResult<Vec<u8>>;
5656

5757
#[method(name = "metaConsensusRpc_mintBlock")]
58-
async fn mint_block(&self, dnc_txs: Vec<DNCTx>) -> RpcResult<(Vec<u8>, Vec<DMCTx>)>;
58+
async fn mint_block(&self, dfc_txs: Vec<DFCTx>) -> RpcResult<(Vec<u8>, Vec<DMCTx>)>;
5959

6060
#[method(name = "metaConsensusRpc_connectBlock")]
6161
async fn connect_block(
6262
&self,
6363
dmc_payload: Vec<u8>,
64-
dnc_txs: Vec<DNCTx>,
64+
dfc_txs: Vec<DFCTx>,
6565
) -> RpcResult<(bool, Vec<DMCTx>)>;
6666
}
6767

@@ -135,8 +135,8 @@ where
135135
}
136136
}
137137

138-
async fn mint_block(&self, dnc_txs: Vec<DNCTx>) -> RpcResult<(Vec<u8>, Vec<DMCTx>)> {
139-
//TODO(surangap): validate the dnc_txs. do the account balance changes accordingly
138+
async fn mint_block(&self, dfc_txs: Vec<DFCTx>) -> RpcResult<(Vec<u8>, Vec<DMCTx>)> {
139+
//TODO(surangap): validate the dfc_txs. do the account balance changes accordingly
140140

141141
// send command to mint the next block
142142
let sink = self.command_sink.clone();
@@ -171,7 +171,7 @@ where
171171
async fn connect_block(
172172
&self,
173173
dmc_payload: Vec<u8>,
174-
dnc_txs: Vec<DNCTx>,
174+
dfc_txs: Vec<DFCTx>,
175175
) -> RpcResult<(bool, Vec<DMCTx>)> {
176176
// decode the signed block
177177
let decoded = SignedBlock::decode(&mut &dmc_payload[..]);

0 commit comments

Comments
 (0)