chain events: Move to chain/events

This commit is contained in:
Łukasz Magiera 2019-09-05 09:40:50 +02:00
parent 50960b3f8c
commit caed73ef6c
5 changed files with 18 additions and 11 deletions

View File

@ -1,14 +1,17 @@
package store package events
import ( import (
"sync" "sync"
logging "github.com/ipfs/go-log"
"golang.org/x/xerrors" "golang.org/x/xerrors"
"github.com/filecoin-project/go-lotus/build" "github.com/filecoin-project/go-lotus/build"
"github.com/filecoin-project/go-lotus/chain/types" "github.com/filecoin-project/go-lotus/chain/types"
) )
var log = logging.Logger("events")
// `curH`-`ts.Height` = `confidence` // `curH`-`ts.Height` = `confidence`
type HeightHandler func(ts *types.TipSet, curH uint64) error type HeightHandler func(ts *types.TipSet, curH uint64) error
type RevertHandler func(ts *types.TipSet) error type RevertHandler func(ts *types.TipSet) error

View File

@ -1,10 +1,11 @@
package store package events
import ( import (
"github.com/ipfs/go-cid"
"math" "math"
"sync" "sync"
"github.com/ipfs/go-cid"
"github.com/filecoin-project/go-lotus/chain/address" "github.com/filecoin-project/go-lotus/chain/address"
"github.com/filecoin-project/go-lotus/chain/types" "github.com/filecoin-project/go-lotus/chain/types"
) )

View File

@ -1,8 +1,9 @@
package store package events
import ( import (
"github.com/filecoin-project/go-lotus/chain/types"
"sync" "sync"
"github.com/filecoin-project/go-lotus/chain/types"
) )
type heightEvents struct { type heightEvents struct {

View File

@ -1,14 +1,16 @@
package store package events
import ( import (
"fmt" "fmt"
"github.com/filecoin-project/go-lotus/build" "testing"
"github.com/filecoin-project/go-lotus/chain/address"
"github.com/filecoin-project/go-lotus/chain/types"
"github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
"github.com/multiformats/go-multihash" "github.com/multiformats/go-multihash"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"testing"
"github.com/filecoin-project/go-lotus/build"
"github.com/filecoin-project/go-lotus/chain/address"
"github.com/filecoin-project/go-lotus/chain/types"
) )
var dummyCid cid.Cid var dummyCid cid.Cid

View File

@ -1,4 +1,4 @@
package store package events
import ( import (
"golang.org/x/xerrors" "golang.org/x/xerrors"