mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00

* start * pass tests, (cannot get before put!) and clean up. * add rpc call. * create and pass tests, fix bugs. fully implement rpc * As always fmt * remover old test * clean up proto comment * put the logger back in place. * revert back to 10 sec limit. * migration, change utxoChanged removal to whole utxoEntryPair, add methods to update circulating supply, intialize circulating supply from reset. * Update utxoindex.go * ad * rename to max, change comment * one more total to max Co-authored-by: Ori Newman <orinewman1@gmail.com>
41 lines
1.2 KiB
Go
41 lines
1.2 KiB
Go
package appmessage
|
|
|
|
// GetCoinSupplyRequestMessage is an appmessage corresponding to
|
|
// its respective RPC message
|
|
type GetCoinSupplyRequestMessage struct {
|
|
baseMessage
|
|
}
|
|
|
|
// Command returns the protocol command string for the message
|
|
func (msg *GetCoinSupplyRequestMessage) Command() MessageCommand {
|
|
return CmdGetCoinSupplyRequestMessage
|
|
}
|
|
|
|
// NewGetCoinSupplyRequestMessage returns a instance of the message
|
|
func NewGetCoinSupplyRequestMessage() *GetCoinSupplyRequestMessage {
|
|
return &GetCoinSupplyRequestMessage{}
|
|
}
|
|
|
|
// GetCoinSupplyResponseMessage is an appmessage corresponding to
|
|
// its respective RPC message
|
|
type GetCoinSupplyResponseMessage struct {
|
|
baseMessage
|
|
MaxSompi uint64
|
|
CirculatingSompi uint64
|
|
|
|
Error *RPCError
|
|
}
|
|
|
|
// Command returns the protocol command string for the message
|
|
func (msg *GetCoinSupplyResponseMessage) Command() MessageCommand {
|
|
return CmdGetCoinSupplyResponseMessage
|
|
}
|
|
|
|
// NewGetCoinSupplyResponseMessage returns a instance of the message
|
|
func NewGetCoinSupplyResponseMessage(maxSompi uint64, circulatingSompi uint64) *GetCoinSupplyResponseMessage {
|
|
return &GetCoinSupplyResponseMessage{
|
|
MaxSompi: maxSompi,
|
|
CirculatingSompi: circulatingSompi,
|
|
}
|
|
}
|