mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
Correct example usage.
The variable to insert is 'genesis', not 'block'.
This commit is contained in:
parent
25684a2ccb
commit
dc3a2dbac0
@ -33,7 +33,7 @@ change.
|
||||
// Insert the main network genesis block.
|
||||
pver := btcwire.ProtocolVersion
|
||||
genesis := btcutil.NewBlock(&btcwire.GenesisBlock, pver)
|
||||
newHeight, err := db.InsertBlock(block)
|
||||
newHeight, err := db.InsertBlock(genesis)
|
||||
if err != nil {
|
||||
// Log and handle the error
|
||||
}
|
||||
|
2
doc.go
2
doc.go
@ -51,7 +51,7 @@ referenced parent block to already exist. In a more concrete example:
|
||||
// Insert the main network genesis block.
|
||||
pver := btcwire.ProtocolVersion
|
||||
genesis := btcutil.NewBlock(&btcwire.GenesisBlock, pver)
|
||||
newHeight, err := db.InsertBlock(block)
|
||||
newHeight, err := db.InsertBlock(genesis)
|
||||
if err != nil {
|
||||
// Log and handle the error
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user