Update example code.
Example code used old api for OnBlockConnected and OnBlockDisconnected
This commit is contained in:
parent
1831071905
commit
7cb04ae6db
1 changed files with 4 additions and 4 deletions
|
@ -21,11 +21,11 @@ func main() {
|
||||||
// for notifications. See the documentation of the btcrpcclient
|
// for notifications. See the documentation of the btcrpcclient
|
||||||
// NotificationHandlers type for more details about each handler.
|
// NotificationHandlers type for more details about each handler.
|
||||||
ntfnHandlers := btcrpcclient.NotificationHandlers{
|
ntfnHandlers := btcrpcclient.NotificationHandlers{
|
||||||
OnBlockConnected: func(hash *wire.ShaHash, height int32) {
|
OnBlockConnected: func(hash *wire.ShaHash, height int32, time time.Time) {
|
||||||
log.Printf("Block connected: %v (%d)", hash, height)
|
log.Printf("Block connected: %v (%d) %v", hash, height, time)
|
||||||
},
|
},
|
||||||
OnBlockDisconnected: func(hash *wire.ShaHash, height int32) {
|
OnBlockDisconnected: func(hash *wire.ShaHash, height int32, time time.Time) {
|
||||||
log.Printf("Block disconnected: %v (%d)", hash, height)
|
log.Printf("Block disconnected: %v (%d) %v", hash, height, time)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue