Fix coinbase
This commit is contained in:
parent
f9a35c2474
commit
2b2364e69c
32 changed files with 61 additions and 61 deletions
|
@ -139,7 +139,7 @@ on your OS. There is a great tutorial for how to do this on Linux [here](https:/
|
|||
## Architecture
|
||||
|
||||
`rosetta-bitcoin` uses the `syncer`, `storage`, `parser`, and `server` package
|
||||
from [`rosetta-sdk-go`](https://github.com/lbryio/rosetta-sdk-go) instead
|
||||
from [`rosetta-sdk-go`](https://github.com/coinbase/rosetta) instead
|
||||
of a new Bitcoin-specific implementation of packages of similar functionality. Below
|
||||
you can find a high-level overview of how everything fits together:
|
||||
|
||||
|
|
|
@ -29,9 +29,9 @@ import (
|
|||
lbryUtils "github.com/lbryio/rosetta-lbry/utils"
|
||||
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/lbryio/rosetta-sdk-go/storage"
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/lbryio/rosetta-sdk-go/utils"
|
||||
"github.com/coinbase/rosetta/storage"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
"github.com/coinbase/rosetta/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -24,8 +24,8 @@ import (
|
|||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/lbryio/rosetta-sdk-go/storage"
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/storage"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/btcsuite/btcd/chaincfg"
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -23,7 +23,7 @@ import (
|
|||
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
||||
"github.com/btcsuite/btcd/txscript"
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
)
|
||||
|
||||
// ParseCoinIdentifier returns the corresponding hash and index associated
|
||||
|
|
|
@ -25,8 +25,8 @@ import (
|
|||
"github.com/lbryio/rosetta-lbry/lbry"
|
||||
|
||||
"github.com/btcsuite/btcd/chaincfg"
|
||||
"github.com/lbryio/rosetta-sdk-go/storage"
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/storage"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
)
|
||||
|
||||
// Mode is the setting that determines if
|
||||
|
|
|
@ -22,9 +22,9 @@ import (
|
|||
|
||||
"github.com/lbryio/rosetta-lbry/lbry"
|
||||
|
||||
"github.com/lbryio/rosetta-sdk-go/storage"
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/lbryio/rosetta-sdk-go/utils"
|
||||
"github.com/coinbase/rosetta/storage"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
"github.com/coinbase/rosetta/utils"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
2
go.mod
2
go.mod
|
@ -5,7 +5,7 @@ go 1.13
|
|||
require (
|
||||
github.com/btcsuite/btcd v0.21.0-beta
|
||||
github.com/btcsuite/btcutil v1.0.2
|
||||
github.com/lbryio/rosetta-sdk-go v0.5.9
|
||||
github.com/coinbase/rosetta v0.5.9
|
||||
github.com/dgraph-io/badger/v2 v2.2007.2
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.2.2
|
||||
github.com/stretchr/testify v1.6.1
|
||||
|
|
4
go.sum
4
go.sum
|
@ -62,8 +62,8 @@ github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJ
|
|||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/lbryio/rosetta-sdk-go v0.5.9 h1:CuGQE3HFmYwdEACJnuOtVI9cofqPsGvq6FdFIzaOPKI=
|
||||
github.com/lbryio/rosetta-sdk-go v0.5.9/go.mod h1:xd4wYUhV3LkY78SPH8BUhc88rXfn2jYgN9BfiSjbcvM=
|
||||
github.com/coinbase/rosetta v0.5.9 h1:CuGQE3HFmYwdEACJnuOtVI9cofqPsGvq6FdFIzaOPKI=
|
||||
github.com/coinbase/rosetta v0.5.9/go.mod h1:xd4wYUhV3LkY78SPH8BUhc88rXfn2jYgN9BfiSjbcvM=
|
||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
|
|
|
@ -17,9 +17,9 @@ package indexer
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/lbryio/rosetta-sdk-go/parser"
|
||||
"github.com/lbryio/rosetta-sdk-go/storage"
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/parser"
|
||||
"github.com/coinbase/rosetta/storage"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
)
|
||||
|
||||
var _ storage.BalanceStorageHandler = (*BalanceStorageHandler)(nil)
|
||||
|
|
|
@ -17,10 +17,10 @@ package indexer
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/lbryio/rosetta-sdk-go/asserter"
|
||||
"github.com/lbryio/rosetta-sdk-go/parser"
|
||||
"github.com/lbryio/rosetta-sdk-go/storage"
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/asserter"
|
||||
"github.com/coinbase/rosetta/parser"
|
||||
"github.com/coinbase/rosetta/storage"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
)
|
||||
|
||||
var _ storage.BalanceStorageHelper = (*BalanceStorageHelper)(nil)
|
||||
|
|
|
@ -17,8 +17,8 @@ package indexer
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/lbryio/rosetta-sdk-go/storage"
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/storage"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
)
|
||||
|
||||
var _ storage.CoinStorageHelper = (*CoinStorageHelper)(nil)
|
||||
|
|
|
@ -25,13 +25,13 @@ import (
|
|||
"github.com/lbryio/rosetta-lbry/services"
|
||||
"github.com/lbryio/rosetta-lbry/utils"
|
||||
|
||||
"github.com/coinbase/rosetta/asserter"
|
||||
"github.com/coinbase/rosetta/storage"
|
||||
"github.com/coinbase/rosetta/syncer"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
sdkUtils "github.com/coinbase/rosetta/utils"
|
||||
"github.com/dgraph-io/badger/v2"
|
||||
"github.com/dgraph-io/badger/v2/options"
|
||||
"github.com/lbryio/rosetta-sdk-go/asserter"
|
||||
"github.com/lbryio/rosetta-sdk-go/storage"
|
||||
"github.com/lbryio/rosetta-sdk-go/syncer"
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
sdkUtils "github.com/lbryio/rosetta-sdk-go/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -27,9 +27,9 @@ import (
|
|||
"github.com/lbryio/rosetta-lbry/lbry"
|
||||
mocks "github.com/lbryio/rosetta-lbry/mocks/indexer"
|
||||
|
||||
"github.com/lbryio/rosetta-sdk-go/storage"
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/lbryio/rosetta-sdk-go/utils"
|
||||
"github.com/coinbase/rosetta/storage"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
"github.com/coinbase/rosetta/utils"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
|
6
main.go
6
main.go
|
@ -30,10 +30,10 @@ import (
|
|||
"github.com/lbryio/rosetta-lbry/services"
|
||||
"github.com/lbryio/rosetta-lbry/utils"
|
||||
|
||||
"github.com/coinbase/rosetta/asserter"
|
||||
"github.com/coinbase/rosetta/server"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
|
||||
"github.com/lbryio/rosetta-sdk-go/asserter"
|
||||
"github.com/lbryio/rosetta-sdk-go/server"
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
|
|
@ -9,9 +9,9 @@ import (
|
|||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
storage "github.com/lbryio/rosetta-sdk-go/storage"
|
||||
storage "github.com/coinbase/rosetta/storage"
|
||||
|
||||
types "github.com/lbryio/rosetta-sdk-go/types"
|
||||
types "github.com/coinbase/rosetta/types"
|
||||
)
|
||||
|
||||
// Client is an autogenerated mock type for the Client type
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
types "github.com/lbryio/rosetta-sdk-go/types"
|
||||
types "github.com/coinbase/rosetta/types"
|
||||
)
|
||||
|
||||
// Client is an autogenerated mock type for the Client type
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
types "github.com/lbryio/rosetta-sdk-go/types"
|
||||
types "github.com/coinbase/rosetta/types"
|
||||
)
|
||||
|
||||
// Indexer is an autogenerated mock type for the Indexer type
|
||||
|
|
|
@ -19,8 +19,8 @@ import (
|
|||
|
||||
"github.com/lbryio/rosetta-lbry/configuration"
|
||||
|
||||
"github.com/lbryio/rosetta-sdk-go/server"
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/server"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
)
|
||||
|
||||
// AccountAPIService implements the server.AccountAPIServicer interface.
|
||||
|
|
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/lbryio/rosetta-lbry/lbry"
|
||||
mocks "github.com/lbryio/rosetta-lbry/mocks/services"
|
||||
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ import (
|
|||
|
||||
"github.com/lbryio/rosetta-lbry/configuration"
|
||||
|
||||
"github.com/lbryio/rosetta-sdk-go/server"
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/server"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
)
|
||||
|
||||
// BlockAPIService implements the server.BlockAPIServicer interface.
|
||||
|
|
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/lbryio/rosetta-lbry/configuration"
|
||||
mocks "github.com/lbryio/rosetta-lbry/mocks/services"
|
||||
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -31,9 +31,9 @@ import (
|
|||
"github.com/btcsuite/btcd/txscript"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/lbryio/rosetta-sdk-go/parser"
|
||||
"github.com/lbryio/rosetta-sdk-go/server"
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/parser"
|
||||
"github.com/coinbase/rosetta/server"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -23,7 +23,7 @@ import (
|
|||
"github.com/lbryio/rosetta-lbry/lbry"
|
||||
mocks "github.com/lbryio/rosetta-lbry/mocks/services"
|
||||
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
package services
|
||||
|
||||
import (
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -19,8 +19,8 @@ import (
|
|||
|
||||
"github.com/lbryio/rosetta-lbry/configuration"
|
||||
|
||||
"github.com/lbryio/rosetta-sdk-go/server"
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/server"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
)
|
||||
|
||||
// MempoolAPIService implements the server.MempoolAPIServicer interface.
|
||||
|
|
|
@ -21,7 +21,7 @@ import (
|
|||
"github.com/lbryio/rosetta-lbry/configuration"
|
||||
mocks "github.com/lbryio/rosetta-lbry/mocks/services"
|
||||
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ import (
|
|||
"github.com/lbryio/rosetta-lbry/configuration"
|
||||
"github.com/lbryio/rosetta-lbry/lbry"
|
||||
|
||||
"github.com/lbryio/rosetta-sdk-go/server"
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/server"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
)
|
||||
|
||||
// NetworkAPIService implements the server.NetworkAPIServicer interface.
|
||||
|
|
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/lbryio/rosetta-lbry/lbry"
|
||||
mocks "github.com/lbryio/rosetta-lbry/mocks/services"
|
||||
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ import (
|
|||
|
||||
"github.com/lbryio/rosetta-lbry/configuration"
|
||||
|
||||
"github.com/lbryio/rosetta-sdk-go/asserter"
|
||||
"github.com/lbryio/rosetta-sdk-go/server"
|
||||
"github.com/coinbase/rosetta/asserter"
|
||||
"github.com/coinbase/rosetta/server"
|
||||
)
|
||||
|
||||
// NewBlockchainRouter creates a Mux http.Handler from a collection
|
||||
|
|
|
@ -19,7 +19,7 @@ import (
|
|||
|
||||
"github.com/lbryio/rosetta-lbry/lbry"
|
||||
|
||||
"github.com/lbryio/rosetta-sdk-go/types"
|
||||
"github.com/coinbase/rosetta/types"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -18,8 +18,8 @@ import (
|
|||
"context"
|
||||
"time"
|
||||
|
||||
sdkUtils "github.com/coinbase/rosetta/utils"
|
||||
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
|
||||
sdkUtils "github.com/lbryio/rosetta-sdk-go/utils"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue