Fix a bug in the Cryptonote::verify_checksum function where it would fail on integrated addresses where these addresses are 154 characters when decoded (106 encoded), where the checksum is the last 8 characters, similar to regular addresses which decode to 138 characters.
By using a negative offset for substr, this will grab the last 8 characters, regardless of length of $decoded, which helps future proof this in the case a new address type is ever introduced.
Fix a bug in the
Cryptonote::verify_checksum
function where it would fail on integrated addresses where these addresses are 154 characters when decoded (106 encoded), where the checksum is the last 8 characters, similar to regular addresses which decode to 138 characters.By using a negative offset for
substr
, this will grab the last 8 characters, regardless of length of$decoded
, which helps future proof this in the case a new address type is ever introduced.As a testcase, the monerodocs on integrated addresses provides a sample address:
where on
master
:and with this patch:
The regular address provided in #135 returns
true
for bothmaster
and this branch.