mirror of
https://github.com/kaspanet/kaspad.git
synced 2026-03-21 23:53:33 +00:00
Correct example usage.
The variable to insert is 'genesis', not 'block'.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user