some bugs fixed, add alph node method
This commit is contained in:
10
lib/node.js
10
lib/node.js
@@ -481,12 +481,18 @@ class ALPHRPCNode extends HttpNode {
|
||||
const coinbaseTx = transactions[transactions.length - 1].unsigned
|
||||
if (coinbaseTx.inputs.length === 0) {
|
||||
const {fixedOutputs} = coinbaseTx
|
||||
if(fixedOutputs.length === 1){
|
||||
const {attoAlphAmount, address } = fixedOutputs[0]
|
||||
for(let item of fixedOutputs){
|
||||
const {attoAlphAmount, address } = item
|
||||
if(address === REPORT_ADDRESS){
|
||||
return {height, hash: block_hash, time:Math.trunc(timestamp / 1000), block_reward: Number(attoAlphAmount), block_fees: null };
|
||||
}
|
||||
}
|
||||
// if(fixedOutputs.length === 1){
|
||||
// const {attoAlphAmount, address } = fixedOutputs[0]
|
||||
// if(address === REPORT_ADDRESS){
|
||||
// return {height, hash: block_hash, time:Math.trunc(timestamp / 1000), block_reward: Number(attoAlphAmount), block_fees: null };
|
||||
// }
|
||||
// }
|
||||
}
|
||||
return false
|
||||
} catch(err){
|
||||
|
||||
Reference in New Issue
Block a user