Merge error codes
This commit is contained in:
commit
8421285313
|
@ -15,6 +15,7 @@ import (
|
||||||
"google.golang.org/grpc/peer"
|
"google.golang.org/grpc/peer"
|
||||||
"google.golang.org/grpc/reflection"
|
"google.golang.org/grpc/reflection"
|
||||||
|
|
||||||
|
"github.com/adityapk00/lightwalletd/common"
|
||||||
"github.com/adityapk00/lightwalletd/frontend"
|
"github.com/adityapk00/lightwalletd/frontend"
|
||||||
"github.com/adityapk00/lightwalletd/walletrpc"
|
"github.com/adityapk00/lightwalletd/walletrpc"
|
||||||
)
|
)
|
||||||
|
@ -159,6 +160,16 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get the sapling activation height from the RPC
|
||||||
|
saplingHeight, chainName, err := common.GetSaplingInfo(rpcClient)
|
||||||
|
if err != nil {
|
||||||
|
log.WithFields(logrus.Fields{
|
||||||
|
"error": err,
|
||||||
|
}).Warn("Unable to get sapling activation height")
|
||||||
|
}
|
||||||
|
|
||||||
|
log.WithField("saplingHeight", saplingHeight).Info("Got sapling height ", saplingHeight, " chain ", chainName)
|
||||||
|
|
||||||
// Compact transaction service initialization
|
// Compact transaction service initialization
|
||||||
service, err := frontend.NewSQLiteStreamer(opts.dbPath, rpcClient, log)
|
service, err := frontend.NewSQLiteStreamer(opts.dbPath, rpcClient, log)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -220,6 +220,7 @@ func (s *SqlStreamer) GetLightdInfo(ctx context.Context, in *walletrpc.Empty) (*
|
||||||
s.log.WithFields(logrus.Fields{
|
s.log.WithFields(logrus.Fields{
|
||||||
"error": err,
|
"error": err,
|
||||||
}).Warn("Unable to get sapling activation height")
|
}).Warn("Unable to get sapling activation height")
|
||||||
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO these are called Error but they aren't at the moment.
|
// TODO these are called Error but they aren't at the moment.
|
||||||
|
|
Loading…
Reference in New Issue