Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9bc777cf7d | |||
| 66fd45fd11 | |||
| 6c09ba09fd | |||
| 90aac49c77 |
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cryptoforknote-util",
|
||||
"version": "11.2.0",
|
||||
"version": "11.2.3",
|
||||
"main": "cryptoforknote-util",
|
||||
"author": {
|
||||
"name": "LucasJones",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
const bignum = require('bignum');
|
||||
const base58 = require('base58-native');
|
||||
const bignum = require('bignum');
|
||||
const base58 = require('base58-native');
|
||||
const bitcoin = require('bitcoinjs-lib');
|
||||
|
||||
const diff1 = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
|
||||
|
||||
@@ -258,15 +259,15 @@ module.exports.RtmBlockTemplate = function(rpcData, poolAddress) {
|
||||
// tx input scripts instead of size of script part so not sure how to parse them
|
||||
// just drop them for now
|
||||
// example: https://explorer.raptoreum.com/tx/1461d70fa8362b0896e2e9be6312521f2684f22c9b0f9152695f33f67d9f9d3f
|
||||
rpcData.transactions.forEach(function(tx, i) {
|
||||
rpcData.transactions.forEach(function(tx) {
|
||||
if (tx.version != 1) {
|
||||
try {
|
||||
bitcoin.Transaction.fromBuffer(Buffer.from(tx.data, 'hex'), true, i == 0);
|
||||
bitcoin.Transaction.fromBuffer(Buffer.from(tx.data, 'hex'), false, false);
|
||||
} catch(err) {
|
||||
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)
|
||||
}
|
||||
tx.push(tx);
|
||||
txs.push(tx);
|
||||
} else {
|
||||
console.error("Skip RTM v1 tx: " + tx.data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user