Skip to content

Commit

Permalink
signing: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Aug 12, 2024
1 parent 03446f3 commit 2d3761a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
42 changes: 21 additions & 21 deletions src/signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ mod tests {
encoding::{from_reader, to_bytes},
transactions::{
CoveredFields, FileContract, FileContractID, FileContractRevision, SiacoinInput,
SiacoinOutput, SiafundInput, SiafundOutput, SiafundOutputID, StorageProof, Transaction,
SiacoinOutput, SiafundInput, SiafundOutput, StorageProof, Transaction,
TransactionSignature,
},
unlock_conditions::UnlockConditions,
Expand Down Expand Up @@ -433,50 +433,50 @@ mod tests {
height: 1,
whole_transaction: false,
signature: Signature([
29, 47, 12, 218, 154, 175, 190, 58, 200, 123, 15, 172, 247, 253, 244, 12, 50,
43, 116, 19, 41, 31, 230, 60, 57, 113, 249, 98, 117, 95, 231, 28, 53, 230, 56,
165, 110, 179, 162, 97, 153, 165, 219, 192, 146, 68, 216, 162, 228, 49, 31,
194, 99, 179, 75, 121, 55, 114, 233, 94, 43, 102, 59, 1,
181, 144, 210, 1, 156, 166, 8, 49, 142, 181, 56, 101, 211, 105, 252, 11, 201,
110, 98, 25, 71, 131, 107, 123, 234, 40, 142, 178, 115, 198, 205, 108, 60, 26,
9, 127, 170, 98, 99, 107, 25, 113, 138, 180, 229, 195, 37, 183, 36, 178, 210,
21, 98, 217, 114, 185, 112, 100, 170, 121, 104, 207, 182, 1,
]),
},
TestCase {
height: 10,
whole_transaction: false,
signature: Signature([
176, 195, 184, 108, 54, 219, 146, 0, 239, 111, 236, 211, 20, 66, 101, 42, 242,
119, 170, 23, 133, 158, 137, 93, 139, 249, 206, 81, 126, 147, 209, 118, 90, 70,
235, 19, 121, 10, 166, 192, 111, 160, 61, 246, 210, 190, 144, 50, 234, 169,
101, 204, 207, 121, 34, 60, 31, 199, 232, 212, 184, 227, 235, 10,
136, 111, 242, 99, 13, 112, 234, 124, 181, 21, 23, 158, 192, 18, 187, 33, 149,
13, 192, 196, 133, 226, 125, 225, 116, 234, 56, 179, 135, 166, 182, 9, 44, 41,
122, 186, 233, 10, 113, 89, 3, 132, 97, 222, 23, 35, 106, 32, 233, 220, 194,
83, 58, 200, 141, 187, 33, 205, 178, 98, 147, 149, 253, 9,
]),
},
TestCase {
height: 100,
whole_transaction: false,
signature: Signature([
198, 225, 244, 254, 231, 185, 193, 161, 65, 214, 120, 14, 97, 175, 136, 58,
102, 145, 39, 245, 250, 117, 105, 167, 182, 157, 27, 136, 212, 52, 192, 51,
102, 144, 7, 91, 10, 80, 72, 171, 163, 190, 43, 129, 117, 20, 48, 240, 34, 154,
62, 110, 127, 205, 211, 192, 128, 172, 116, 53, 160, 196, 80, 13,
172, 255, 46, 255, 7, 203, 157, 222, 3, 90, 1, 63, 126, 149, 142, 90, 159, 179,
94, 24, 159, 89, 48, 110, 9, 85, 249, 161, 129, 235, 104, 65, 116, 106, 139,
241, 96, 111, 111, 185, 55, 111, 170, 177, 133, 225, 68, 113, 143, 119, 243,
71, 130, 112, 179, 17, 20, 191, 89, 133, 69, 15, 137, 8,
]),
},
TestCase {
height: 1000,
whole_transaction: false,
signature: Signature([
193, 84, 122, 111, 129, 147, 50, 159, 0, 221, 52, 9, 239, 63, 61, 45, 249, 97,
207, 96, 96, 117, 238, 242, 143, 226, 216, 127, 244, 70, 186, 163, 172, 122,
230, 94, 23, 115, 228, 12, 91, 239, 95, 29, 148, 82, 166, 236, 61, 120, 87,
157, 234, 32, 181, 68, 197, 248, 246, 114, 238, 150, 19, 15,
154, 185, 87, 199, 88, 179, 54, 250, 4, 244, 56, 175, 57, 117, 40, 183, 17,
139, 220, 120, 68, 57, 5, 235, 114, 61, 246, 246, 67, 158, 110, 232, 5, 255,
139, 236, 235, 76, 156, 218, 108, 110, 250, 96, 172, 78, 13, 143, 186, 221,
207, 49, 14, 156, 193, 27, 182, 239, 101, 152, 215, 249, 55, 8,
]),
},
TestCase {
height: 10000,
whole_transaction: false,
signature: Signature([
193, 84, 122, 111, 129, 147, 50, 159, 0, 221, 52, 9, 239, 63, 61, 45, 249, 97,
207, 96, 96, 117, 238, 242, 143, 226, 216, 127, 244, 70, 186, 163, 172, 122,
230, 94, 23, 115, 228, 12, 91, 239, 95, 29, 148, 82, 166, 236, 61, 120, 87,
157, 234, 32, 181, 68, 197, 248, 246, 114, 238, 150, 19, 15,
154, 185, 87, 199, 88, 179, 54, 250, 4, 244, 56, 175, 57, 117, 40, 183, 17,
139, 220, 120, 68, 57, 5, 235, 114, 61, 246, 246, 67, 158, 110, 232, 5, 255,
139, 236, 235, 76, 156, 218, 108, 110, 250, 96, 172, 78, 13, 143, 186, 221,
207, 49, 14, 156, 193, 27, 182, 239, 101, 152, 215, 249, 55, 8,
]),
},
];
Expand Down
3 changes: 1 addition & 2 deletions src/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ impl Transaction {
"siafund_inputs index out of bounds".to_string(),
));
}
to_writer(&mut state, &self.siafund_inputs[i])?;
state.update(chain.replay_prefix());
to_writer(&mut state, &self.siafund_inputs[i])?;
}

for &i in covered_fields.siafund_outputs.iter() {
Expand All @@ -386,7 +386,6 @@ impl Transaction {
"siafund_outputs index out of bounds".to_string(),
));
}
state.update(chain.replay_prefix());
to_writer(&mut state, &self.siafund_outputs[i])?;
}

Expand Down

0 comments on commit 2d3761a

Please sign in to comment.