Browse Source

fix more compile issues

master
Jonathan "Duke" Leto 2 years ago
parent
commit
74cf107b73
  1. 4
      frontend/service.go
  2. 4
      parser/block.go
  3. 7
      parser/transaction.go

4
frontend/service.go

@ -374,7 +374,7 @@ func (s *lwdStreamer) GetMempoolStream(_empty *walletrpc.Empty, resp walletrpc.C
var mempoolMap *map[string]*walletrpc.CompactTx
var mempoolList []string
// Last time we pulled a copy of the mempool from zcashd.
// Last time we pulled a copy of the mempool from hushd
var lastMempool time.Time
func (s *lwdStreamer) GetMempoolTx(exclude *walletrpc.Exclude, resp walletrpc.CompactTxStreamer_GetMempoolTxServer) error {
@ -419,7 +419,7 @@ func (s *lwdStreamer) GetMempoolTx(exclude *walletrpc.Exclude, resp walletrpc.Co
return err
}
// conver to binary
// convert to binary
txBytes, err := hex.DecodeString(txStr)
if err != nil {
return err

4
parser/block.go

@ -1,3 +1,7 @@
// Copyright (c) 2019-2022 The Hush developers
// Copyright (c) 2019-2020 The Zcash developers
// Package parser deserializes blocks from hushd
package parser
import (

7
parser/transaction.go

@ -126,6 +126,13 @@ func (p *spend) ParseFromSlice(data []byte) ([]byte, error) {
return []byte(s), nil
}
// HasSaplingElements indicates whether a transaction has
// at least one sapling shielded input or output.
func (tx *Transaction) HasSaplingElements() bool {
nshielded := len(tx.shieldedSpends) + len(tx.shieldedOutputs)
return tx.version >= 4 && nshielded > 0
}
func (p *spend) ToCompact() *walletrpc.CompactSpend {
return &walletrpc.CompactSpend{
Nf: p.nullifier,

Loading…
Cancel
Save