mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-14 03:17:19 +00:00
Skip parsing AuxPoW block header where the header is too short (i.e. checkpoint blocks)
This commit is contained in:
@@ -196,9 +196,8 @@ public class AltcoinBlock extends org.bitcoinj.core.Block {
|
|||||||
this.auxpow = null;
|
this.auxpow = null;
|
||||||
if (this.auxpowChain) {
|
if (this.auxpowChain) {
|
||||||
final AuxPoWNetworkParameters auxpowParams = (AuxPoWNetworkParameters)this.params;
|
final AuxPoWNetworkParameters auxpowParams = (AuxPoWNetworkParameters)this.params;
|
||||||
if (auxpowParams.isAuxPoWBlockVersion(this.getRawVersion())) {
|
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
|
||||||
// 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);
|
this.auxpow = new AuxPoW(params, payload, cursor, this, serializer);
|
||||||
optimalEncodingMessageSize += auxpow.getOptimalEncodingMessageSize();
|
optimalEncodingMessageSize += auxpow.getOptimalEncodingMessageSize();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user