mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-04 13:16:43 +00:00
[NOD-668] Rename height to blueScore in OnFilteredBlockAdded. (#589)
This commit is contained in:
parent
a7d3a40465
commit
b5f365d282
@ -21,9 +21,9 @@ func main() {
|
||||
// for notifications. See the documentation of the rpcclient
|
||||
// NotificationHandlers type for more details about each handler.
|
||||
ntfnHandlers := rpcclient.NotificationHandlers{
|
||||
OnFilteredBlockAdded: func(height uint64, header *wire.BlockHeader, txns []*util.Tx) {
|
||||
OnFilteredBlockAdded: func(blueScore uint64, header *wire.BlockHeader, txns []*util.Tx) {
|
||||
log.Printf("Block added: %s (%d) %s",
|
||||
header.BlockHash(), height, header.Timestamp)
|
||||
header.BlockHash(), blueScore, header.Timestamp)
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -87,8 +87,8 @@ type NotificationHandlers struct {
|
||||
// bloackDAG. It will only be invoked if a preceding call to
|
||||
// NotifyBlocks has been made to register for the notification and the
|
||||
// function is non-nil. Its parameters differ from OnBlockAdded: it
|
||||
// receives the block's height, header, and relevant transactions.
|
||||
OnFilteredBlockAdded func(height uint64, header *wire.BlockHeader,
|
||||
// receives the block's blueScore, header, and relevant transactions.
|
||||
OnFilteredBlockAdded func(blueScore uint64, header *wire.BlockHeader,
|
||||
txs []*util.Tx)
|
||||
|
||||
// OnChainChanged is invoked when the selected parent chain of the
|
||||
@ -160,7 +160,7 @@ func (c *Client) handleNotification(ntfn *rawNotification) {
|
||||
return
|
||||
}
|
||||
|
||||
blockHeight, blockHeader, transactions, err :=
|
||||
blockBlueScore, blockHeader, transactions, err :=
|
||||
parseFilteredBlockAddedParams(ntfn.Params)
|
||||
if err != nil {
|
||||
log.Warnf("Received invalid filtered block "+
|
||||
@ -168,7 +168,7 @@ func (c *Client) handleNotification(ntfn *rawNotification) {
|
||||
return
|
||||
}
|
||||
|
||||
c.ntfnHandlers.OnFilteredBlockAdded(blockHeight,
|
||||
c.ntfnHandlers.OnFilteredBlockAdded(blockBlueScore,
|
||||
blockHeader, transactions)
|
||||
|
||||
// OnRelevantTxAccepted
|
||||
|
Loading…
x
Reference in New Issue
Block a user