diff --git a/chain/src/txhashset.rs b/chain/src/txhashset.rs index 07ad5072..41408f57 100644 --- a/chain/src/txhashset.rs +++ b/chain/src/txhashset.rs @@ -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)); } }