From 0f9c969b83357f74618927f2427e07766f26d17f Mon Sep 17 00:00:00 2001 From: MoneroOcean Date: Tue, 5 Nov 2024 16:32:46 +0300 Subject: [PATCH] Fixed SAL parse after fork --- src/cryptonote_basic/cryptonote_basic.h | 2 +- tests/sal.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cryptonote_basic/cryptonote_basic.h b/src/cryptonote_basic/cryptonote_basic.h index 70d6294..a428c0c 100644 --- a/src/cryptonote_basic/cryptonote_basic.h +++ b/src/cryptonote_basic/cryptonote_basic.h @@ -1097,7 +1097,7 @@ namespace cryptonote if (blob_type == BLOB_TYPE_CRYPTONOTE_XHV) { FIELD(pricing_record) } else if (blob_type == BLOB_TYPE_CRYPTONOTE_SALVIUM) { - if (major_version >= 2) FIELD(salvium_pricing_record) + if (major_version >= 255) FIELD(salvium_pricing_record) } else if (blob_type == BLOB_TYPE_CRYPTONOTE_ZEPHYR) { if (major_version >= 6) { diff --git a/tests/sal.js b/tests/sal.js index 99c78ce..dde5243 100644 --- a/tests/sal.js +++ b/tests/sal.js @@ -2,14 +2,14 @@ let u = require('../build/Release/cryptoforknote'); const b = Buffer.from( -'010194a5ebb406f613c4e7514facf3e5b9923c885357b53f2b02f8e17f9721371296b99113035f00000000020001ffcb6d018f9ffec12d03125e128c041c8a2d41fab9ebe2a7a4b10afbef4e134ec7ba3151c8c730a644310353414c3c7334015f99bdbbe70161dafb2da2fd9a4285da893a7519cff350981a959f525c43e5c60211000000000000000000000000000000000001e3c7bfb00b00020001ffcb6d0023016b6961b458286074406192961c1f0e5236455f45fcd6c175c7142d6353a481d60400020000' +'0202fdaca8b906b1670506d0dc45b11cbc87f9ceedfd0cbfa56c14da72ccc27c45105391d2340300000000020001ffbabe0501a1ca9fab2a035c20fce0617f61abf3872058e15b90650b2ac812bf344766f56ee54b680f571e0353414c3c863401618163d383093580900f735ea9ad5d3d0029dd94c2f2a35db88ec37dc32e863302110000bcdd9d15420000000000000000000001c8f2e7ca0a00020001ffbabe05002301bb1086494863ac8de0987e09f7193ac85a356f8abf8725202cbf4dea8b2611f20400020000' , 'hex'); const b2 = u.convert_blob(b, 15); const h1 = b2.toString('hex'); -if (h1 === '010194a5ebb406f613c4e7514facf3e5b9923c885357b53f2b02f8e17f9721371296b99113035f00000000ac81ca3e7bc9369e63563923187d2cfdb42eac839c7fe24e6d5d0080c96d758f01') { +if (h1 === '0202fdaca8b906b1670506d0dc45b11cbc87f9ceedfd0cbfa56c14da72ccc27c45105391d2340300000000604ec6923c81b6477bb224a9c53158cea5c5aee36100aad59c498d3dab92750401') { console.log('PASSED'); } else { console.log('FAILED: ' + h1); process.exit(1); -} +} \ No newline at end of file