mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-14 11:15:51 +00:00
Skip parsing AuxPoW block header where the header is too short (i.e. checkpoint blocks)
This commit is contained in:
parent
8a96492c80
commit
0fe4ac43ba
@ -196,9 +196,8 @@ public class AltcoinBlock extends org.bitcoinj.core.Block {
|
||||
this.auxpow = null;
|
||||
if (this.auxpowChain) {
|
||||
final AuxPoWNetworkParameters auxpowParams = (AuxPoWNetworkParameters)this.params;
|
||||
if (auxpowParams.isAuxPoWBlockVersion(this.getRawVersion())) {
|
||||
// The following is used in dogecoinj, but I don't think we necessarily need it
|
||||
// payload.length >= 160) { // We have at least 2 headers in an Aux block. Workaround for StoredBlocks
|
||||
if (auxpowParams.isAuxPoWBlockVersion(this.getRawVersion())
|
||||
&& payload.length >= 160) { // We have at least 2 headers in an Aux block. Workaround for StoredBlocks
|
||||
this.auxpow = new AuxPoW(params, payload, cursor, this, serializer);
|
||||
optimalEncodingMessageSize += auxpow.getOptimalEncodingMessageSize();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user