Преглед на файлове

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