Correct example usage.

The variable to insert is 'genesis', not 'block'.
This commit is contained in:
Dave Collins 2013-07-29 12:41:30 -05:00
parent 25684a2ccb
commit dc3a2dbac0
2 changed files with 2 additions and 2 deletions

View file

@ -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
View file

@ -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
}