all duplicates (incorrectly) to maintain compatibility with testnet2 (#1103)

This commit is contained in:
Antioch Peverell 2018-05-30 10:15:37 -04:00 committed by GitHub
parent 982dae99a5
commit 601c9e769e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -513,7 +513,14 @@ impl<'a> Extension<'a> {
// processing a new fork so we may get a position on the old
// fork that exists but matches a different node
// filtering that case out
if hash == OutputIdentifier::from_output(out).hash_with_index(pos - 1) {
//
// TODO - the following call to hash() is *INCORRECT*
// TODO - we should be calling hash_with_index(pos - 1)
// TODO - but we cannot safely make this change in testnet2
// TODO - with this incorrect behavior we never get a match, so duplicates are
// allowed
//
if hash == OutputIdentifier::from_output(out).hash() {
return Err(Error::DuplicateCommitment(commit));
}
}