|
|
@ -1449,8 +1449,11 @@ retry: |
|
|
|
witnessdata_check = json_string_value(json_object_get(wb->json, "default_witness_commitment")); |
|
|
|
witnessdata_check = json_string_value(json_object_get(wb->json, "default_witness_commitment")); |
|
|
|
gbt_witness_data(wb, txn_array); |
|
|
|
gbt_witness_data(wb, txn_array); |
|
|
|
// Verify against the pre-calculated value if it exists. Skip the size/OP_RETURN bytes.
|
|
|
|
// Verify against the pre-calculated value if it exists. Skip the size/OP_RETURN bytes.
|
|
|
|
|
|
|
|
if (likely(witnessdata_check)) { |
|
|
|
if (wb->insert_witness && witnessdata_check[0] && safecmp(witnessdata_check + 4, wb->witnessdata) != 0) |
|
|
|
if (wb->insert_witness && witnessdata_check[0] && safecmp(witnessdata_check + 4, wb->witnessdata) != 0) |
|
|
|
LOGERR("Witness from btcd: %s. Calculated Witness: %s", witnessdata_check + 4, wb->witnessdata); |
|
|
|
LOGERR("Witness from btcd: %s. Calculated Witness: %s", witnessdata_check + 4, wb->witnessdata); |
|
|
|
|
|
|
|
} else |
|
|
|
|
|
|
|
LOGNOTICE("Segwit rules returned but no default_witness_commitment to check witness data"); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|