fix alph height use blockChain height
This commit is contained in:
parent
f5f788bc59
commit
ce8efb9890
|
@ -228,18 +228,7 @@ func update_block_confirm(gbt *GbtAlphContext) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if len(input) == 0 {
|
block_height := height // 用区块链返回的height,防止某个块成为下一个高度的叔块,导致高度变化
|
||||||
// for v := range output {
|
|
||||||
// address, amount := output[v].Address, output[v].AttoAlphAmount
|
|
||||||
// if address == addr[fromGroup] && nonce == block.Nonce {
|
|
||||||
// total_amount += savePoint4(stringToFloat64(amount) / math.Pow(10, 18))
|
|
||||||
// fmt.Println(fromGroup, "->", toGroup, "(", height, "):", total_amount, ",", nonce, " ", blockHash, " ", address, " 报块成功")
|
|
||||||
// } else {
|
|
||||||
// fmt.Println(fromGroup, "->", toGroup, "(", height, "):", total_amount, ",", nonce, "不是报块,实际报块地址为:", address)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
block_height := int64(block.Height)
|
|
||||||
dbif.AlphNotifyPoolBlkStatsSuccess(gbt.GbtCtx, uint32(fromGroup), uint32(toGroup), block_height, "", block.Nonce, int64(block.SubIdx), total_amount, 0)
|
dbif.AlphNotifyPoolBlkStatsSuccess(gbt.GbtCtx, uint32(fromGroup), uint32(toGroup), block_height, "", block.Nonce, int64(block.SubIdx), total_amount, 0)
|
||||||
dbif.NotifyAlphBlkDetailSuccess(gbt.GbtCtx, uint32(fromGroup), uint32(toGroup), block_height, "", block.Nonce, int64(block.SubIdx))
|
dbif.NotifyAlphBlkDetailSuccess(gbt.GbtCtx, uint32(fromGroup), uint32(toGroup), block_height, "", block.Nonce, int64(block.SubIdx))
|
||||||
dbif.NotifyAlphBlkNewDb(gbt.GbtCtx, uint32(fromGroup), uint32(toGroup), block_height, block.Hash, true, block.Nonce, int64(block.SubIdx))
|
dbif.NotifyAlphBlkNewDb(gbt.GbtCtx, uint32(fromGroup), uint32(toGroup), block_height, block.Hash, true, block.Nonce, int64(block.SubIdx))
|
||||||
|
|
Loading…
Reference in New Issue