mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Prefix arbitrary data with 127
Since we cannot expect/guarantee a payment ID will be included, the previous position-based code for determining arbitrary data wasn't sufficient.
This commit is contained in:
@@ -217,9 +217,10 @@ test!(
|
||||
1000000,
|
||||
);
|
||||
|
||||
// Make 2 data that is full 255 bytes
|
||||
// Make 2 data that is the full 255 bytes
|
||||
for _ in 0 .. 2 {
|
||||
let data = vec![b'a'; MAX_TX_EXTRA_NONCE_SIZE];
|
||||
// Subtract 1 since we prefix data with 127
|
||||
let data = vec![b'a'; MAX_TX_EXTRA_NONCE_SIZE - 1];
|
||||
assert!(builder.add_data(data).is_ok());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user