Add BIP0023 basic pool extension fields.

This commit adds the optional basic pool extension fields defined by
BIP0023 to the GetBlockTemplateResult GetBlockTemplateCmd types.

ok @jcvernaleo
This commit is contained in:
Dave Collins 2014-06-16 22:12:08 -05:00
parent b6c474de2a
commit b5db9fb485
2 changed files with 12 additions and 0 deletions

View file

@ -2182,6 +2182,9 @@ type TemplateRequest struct {
SigOpLimit interface{} `json:"sigoplimit,omitempty"`
SizeLimit interface{} `json:"sizelimit,omitempty"`
MaxVersion uint32 `json:"maxversion,omitempty"`
// Basic pool extension from BIP 0023.
Target string `json:"target,omitempty"`
}
// isFloatInt64 returns whether the passed float64 is a whole number that safely

View file

@ -109,6 +109,15 @@ type GetBlockTemplateResult struct {
LongPollID string `json:"longpollid,omitempty"`
LongPollURI string `json:"longpolluri,omitempty"`
SubmitOld *bool `json:"submitold,omitempty"`
// Basic pool extension from BIP 0023.
Target string `json:"target,omitempty"`
Expires int64 `json:"expires,omitempty"`
// Mutations from BIP 0023.
MinTime int64 `json:"mintime,omitempty"`
Mutable []string `json:"mutable,omitempty"`
NonceRange string `json:"noncerange,omitempty"`
}
// GetNetworkInfoResult models the data returned from the getnetworkinfo command.