Canonical blocks (#108)

* Update Block w/ newest Block

* Add cascading delete to blocks and transactions tables

* Add handling for new conflicting blocks

* Command line version of sliding window n behind HEAD
This commit is contained in:
Matt K
2017-12-19 14:14:41 -06:00
committed by GitHub
parent 84e77f259d
commit 266c9587c8
19 changed files with 352 additions and 70 deletions
+3 -3
View File
@@ -1,10 +1,10 @@
package geth
import (
"fmt"
"math/big"
"log"
"github.com/8thlight/vulcanizedb/pkg/core"
"github.com/8thlight/vulcanizedb/pkg/geth/node"
"github.com/ethereum/go-ethereum"
@@ -61,7 +61,7 @@ func NewGethBlockchain(ipcPath string) *GethBlockchain {
func (blockchain *GethBlockchain) SubscribeToBlocks(blocks chan core.Block) {
blockchain.outputBlocks = blocks
fmt.Println("SubscribeToBlocks")
log.Println("SubscribeToBlocks")
inputHeaders := make(chan *types.Header, 10)
myContext := context.Background()
blockchain.readGethHeaders = inputHeaders