mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-11 17:55:53 +00:00
Merge pull request #19 from JeremyRand/namecoin-fix-hash-verification
Fix verification bug in Namecoin.
This commit is contained in:
commit
1419b81241
@ -42,6 +42,13 @@ public class NameLookupByBlockHashOneFullBlock implements NameLookupByBlockHash
|
||||
// The full block hasn't been verified in any way!
|
||||
// So let's do that now.
|
||||
|
||||
if (! nameFullBlock.getHash().equals(blockHash)) {
|
||||
throw new Exception("Block hash mismatch!");
|
||||
}
|
||||
|
||||
// Now we know that the received block actually does have a header that matches the hash that we requested.
|
||||
// However, that doesn't mean that the block's contents are valid.
|
||||
|
||||
final EnumSet<Block.VerifyFlag> flags = EnumSet.noneOf(Block.VerifyFlag.class);
|
||||
nameFullBlock.verify(-1, flags);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user