Clarify AfterTimestamp wire format
This commit is contained in:
parent
2981076a14
commit
6732a9078d
|
@ -439,8 +439,8 @@ mod test {
|
||||||
]);
|
]);
|
||||||
let date =
|
let date =
|
||||||
DateTime::<Utc>::from_utc(NaiveDate::from_ymd(2016, 7, 8).and_hms(9, 10, 11), Utc);
|
DateTime::<Utc>::from_utc(NaiveDate::from_ymd(2016, 7, 8).and_hms(9, 10, 11), Utc);
|
||||||
|
let dateIso8601 = "2016-07-08T09:10:11Z";
|
||||||
|
|
||||||
// NewContract(Contract)
|
|
||||||
let tx = Transaction::budget_new(&keypair, to, 192, Hash::default());
|
let tx = Transaction::budget_new(&keypair, to, 192, Hash::default());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
tx.userdata,
|
tx.userdata,
|
||||||
|
@ -451,7 +451,6 @@ mod test {
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
// NewContract(Contract)
|
|
||||||
let tx =
|
let tx =
|
||||||
Transaction::budget_new_on_date(&keypair, to, contract, date, 192, Hash::default());
|
Transaction::budget_new_on_date(&keypair, to, contract, date, 192, Hash::default());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
@ -470,7 +469,7 @@ mod test {
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
// ApplyTimestamp
|
// ApplyTimestamp(date)
|
||||||
let tx = Transaction::budget_new_timestamp(
|
let tx = Transaction::budget_new_timestamp(
|
||||||
&keypair,
|
&keypair,
|
||||||
keypair.pubkey(),
|
keypair.pubkey(),
|
||||||
|
@ -478,13 +477,9 @@ mod test {
|
||||||
date,
|
date,
|
||||||
Hash::default(),
|
Hash::default(),
|
||||||
);
|
);
|
||||||
assert_eq!(
|
let mut expectedUserdata = vec![1, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0];
|
||||||
tx.userdata,
|
expectedUserdata.extend(dateIso8601.as_bytes());
|
||||||
vec![
|
assert_eq!(tx.userdata, expectedUserdata,);
|
||||||
1, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 50, 48, 49, 54, 45, 48, 55, 45, 48, 56, 84,
|
|
||||||
48, 57, 58, 49, 48, 58, 49, 49, 90
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
// ApplySignature
|
// ApplySignature
|
||||||
let tx = Transaction::budget_new_signature(&keypair, keypair.pubkey(), to, Hash::default());
|
let tx = Transaction::budget_new_signature(&keypair, keypair.pubkey(), to, Hash::default());
|
||||||
|
|
Loading…
Reference in New Issue