瀏覽代碼

consensus: Use actual transactions.

parazyd 4 年之前
父節點
當前提交
e24c3b00b4
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      src/consensus2/tx.rs

+ 2 - 3
src/consensus2/tx.rs

@@ -2,15 +2,14 @@ use std::io;
 
 use crate::{
     impl_vec, net,
+    tx::Transaction,
     util::serial::{Decodable, Encodable, SerialDecodable, SerialEncodable, VarInt},
     Result,
 };
 
 /// Temporary transaction representation.
 #[derive(Debug, Clone, PartialEq, SerialEncodable, SerialDecodable)]
-pub struct Tx {
-    pub payload: String,
-}
+pub struct Tx(pub Transaction);
 
 impl net::Message for Tx {
     fn name() -> &'static str {