Correct example usage.
The variable to insert is 'genesis', not 'block'.
This commit is contained in:
parent
25684a2ccb
commit
dc3a2dbac0
2 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue