Fixed RTM tx parsing'
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cryptoforknote-util",
|
"name": "cryptoforknote-util",
|
||||||
"version": "11.2.0",
|
"version": "11.2.1",
|
||||||
"main": "cryptoforknote-util",
|
"main": "cryptoforknote-util",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "LucasJones",
|
"name": "LucasJones",
|
||||||
|
|||||||
2
rtm.js
2
rtm.js
@@ -261,7 +261,7 @@ module.exports.RtmBlockTemplate = function(rpcData, poolAddress) {
|
|||||||
rpcData.transactions.forEach(function(tx, i) {
|
rpcData.transactions.forEach(function(tx, i) {
|
||||||
if (tx.version != 1) {
|
if (tx.version != 1) {
|
||||||
try {
|
try {
|
||||||
bitcoin.Transaction.fromBuffer(Buffer.from(tx.data, 'hex'), true, i == 0);
|
bitcoin.Transaction.fromBuffer(Buffer.from(tx.data, 'hex'), false, false);
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.error("Skip RTM tx due to parse error: " + tx.data);
|
console.error("Skip RTM tx due to parse error: " + tx.data);
|
||||||
return; // skip transaction if it is not parsed OK (varint coding seems to be different for RTM)
|
return; // skip transaction if it is not parsed OK (varint coding seems to be different for RTM)
|
||||||
|
|||||||
Reference in New Issue
Block a user