Add some missing comments on exported items.
This commit is contained in:
parent
ae21689a57
commit
0d1539118b
2 changed files with 8 additions and 2 deletions
|
@ -115,10 +115,12 @@ type Vin struct {
|
|||
Sequence uint32 `json:"sequence"`
|
||||
}
|
||||
|
||||
// IsCoinBase returns a bool to show if a Vin is a Coinbase one or not.
|
||||
func (v *Vin) IsCoinBase() bool {
|
||||
return len(v.Coinbase) > 0
|
||||
}
|
||||
|
||||
// MarshalJSON provides a custom Marshal method for Vin.
|
||||
func (v *Vin) MarshalJSON() ([]byte, error) {
|
||||
if v.IsCoinBase() {
|
||||
coinbaseStruct := struct {
|
||||
|
@ -192,11 +194,14 @@ type ValidateAddressResult struct {
|
|||
Account string `json:"account,omitempty"`
|
||||
}
|
||||
|
||||
// SignRawTransactionResult models the data from the signrawtransaction
|
||||
// command.
|
||||
type SignRawTransactionResult struct {
|
||||
Hex string `json:"hex"`
|
||||
Complete bool `json:"complete"`
|
||||
}
|
||||
|
||||
// ListUnSpentResult models the data from the ListUnSpentResult command.
|
||||
type ListUnSpentResult struct {
|
||||
TxId string `json:"txid"`
|
||||
Vout float64 `json:"vout"`
|
||||
|
|
|
@ -37,7 +37,7 @@ type RawCmd struct {
|
|||
Params []interface{} `json:"params"`
|
||||
}
|
||||
|
||||
// ParseRawCmd is a function to create a custom Cmd from a RawCmd.
|
||||
// RawCmdParser is a function to create a custom Cmd from a RawCmd.
|
||||
type RawCmdParser func(*RawCmd) (Cmd, error)
|
||||
|
||||
type cmd struct {
|
||||
|
@ -70,7 +70,7 @@ func ParseMarshaledCmd(b []byte) (Cmd, error) {
|
|||
}
|
||||
|
||||
// Return a custom command type for recognized
|
||||
var cmd Cmd = nil
|
||||
var cmd Cmd
|
||||
switch r.Method {
|
||||
case "addmultisigaddress":
|
||||
cmd = new(AddMultisigAddressCmd)
|
||||
|
@ -6225,6 +6225,7 @@ func (cmd *SignMessageCmd) UnmarshalJSON(b []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// RawTxInput models the data needed for a raw tx input.
|
||||
type RawTxInput struct {
|
||||
Txid string `json:"txid"`
|
||||
Vout int `json:"vout"`
|
||||
|
|
Loading…
Add table
Reference in a new issue