Domain Separate the coordinator's tributary transaction hashes

This commit is contained in:
Luke Parker
2023-12-01 12:09:41 -05:00
parent 1ca66b846a
commit 1e6cb8044c

View File

@@ -686,7 +686,7 @@ impl TransactionTrait for Transaction {
// Make sure the part we're cutting off is the signature // Make sure the part we're cutting off is the signature
assert_eq!(tx.drain((tx.len() - 64) ..).collect::<Vec<_>>(), signed.signature.serialize()); assert_eq!(tx.drain((tx.len() - 64) ..).collect::<Vec<_>>(), signed.signature.serialize());
} }
Blake2s256::digest(tx).into() Blake2s256::digest([b"Coordinator Tributary Transaction".as_ref(), &tx].concat()).into()
} }
fn verify(&self) -> Result<(), TransactionError> { fn verify(&self) -> Result<(), TransactionError> {