Fix format
This commit is contained in:
parent
9b8b10b6e0
commit
a282cde045
@ -129,14 +129,14 @@ func (b *BCashRPC) GetBlockRaw(hash string) (string, error) {
|
||||
}
|
||||
return "", errors.Annotatef(res.Error, "hash %v", hash)
|
||||
}
|
||||
return res.Result,nil
|
||||
return res.Result, nil
|
||||
}
|
||||
|
||||
// GetBlockBytes returns block with given hash as bytes
|
||||
func (b *BCashRPC) GetBlockBytes(hash string) ([]byte, error) {
|
||||
block,err:=b.GetBlockRaw(hash)
|
||||
block, err := b.GetBlockRaw(hash)
|
||||
if err != nil {
|
||||
return nil,err
|
||||
return nil, err
|
||||
}
|
||||
return hex.DecodeString(block)
|
||||
}
|
||||
|
||||
@ -620,14 +620,14 @@ func (b *BitcoinRPC) GetBlockRaw(hash string) (string, error) {
|
||||
}
|
||||
return "", errors.Annotatef(res.Error, "hash %v", hash)
|
||||
}
|
||||
return res.Result,nil
|
||||
return res.Result, nil
|
||||
}
|
||||
|
||||
// GetBlockBytes returns block with given hash as bytes
|
||||
func (b *BitcoinRPC) GetBlockBytes(hash string) ([]byte, error) {
|
||||
block,err:=b.GetBlockRaw(hash)
|
||||
block, err := b.GetBlockRaw(hash)
|
||||
if err != nil {
|
||||
return nil,err
|
||||
return nil, err
|
||||
}
|
||||
return hex.DecodeString(block)
|
||||
}
|
||||
|
||||
@ -153,14 +153,14 @@ func (zc *FiroRPC) GetBlockRaw(hash string) (string, error) {
|
||||
}
|
||||
return "", errors.Annotatef(res.Error, "hash %v", hash)
|
||||
}
|
||||
return res.Result,nil
|
||||
return res.Result, nil
|
||||
}
|
||||
|
||||
// GetBlockBytes returns block with given hash as bytes
|
||||
func (zc *FiroRPC) GetBlockBytes(hash string) ([]byte, error) {
|
||||
block,err:=zc.GetBlockRaw(hash)
|
||||
block, err := zc.GetBlockRaw(hash)
|
||||
if err != nil {
|
||||
return nil,err
|
||||
return nil, err
|
||||
}
|
||||
return hex.DecodeString(block)
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ const (
|
||||
MainnetMagic wire.BitcoinNet = 0xd4b4bef9
|
||||
TestnetMagic wire.BitcoinNet = 0x0709110b
|
||||
RegtestMagic wire.BitcoinNet = 0xdab5bffa
|
||||
SignetMagic wire.BitcoinNet = 0x7696b422
|
||||
SignetMagic wire.BitcoinNet = 0x7696b422
|
||||
)
|
||||
|
||||
// chain parameters
|
||||
@ -21,7 +21,7 @@ var (
|
||||
MainNetParams chaincfg.Params
|
||||
TestNetParams chaincfg.Params
|
||||
RegTestParams chaincfg.Params
|
||||
SigNetParams chaincfg.Params
|
||||
SigNetParams chaincfg.Params
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@ -168,4 +168,3 @@ func (z *ZCashRPC) GetMempoolEntry(txid string) (*bchain.MempoolEntry, error) {
|
||||
func (z *ZCashRPC) GetBlockRaw(hash string) (string, error) {
|
||||
return "", errors.New("GetBlockRaw: not supported")
|
||||
}
|
||||
|
||||
|
||||
@ -140,7 +140,6 @@ func (c *fakeBlockChain) GetBlockRaw(hash string) (string, error) {
|
||||
return "00e0ff3fd42677a86f1515bafcf9802c1765e02226655a9b97fd44132602000000000000", nil
|
||||
}
|
||||
|
||||
|
||||
func (c *fakeBlockChain) GetTransaction(txid string) (v *bchain.Tx, err error) {
|
||||
v = getTxInBlock(GetTestBitcoinTypeBlock1(c.Parser), txid)
|
||||
if v == nil {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user