mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-27 17:26:43 +00:00
14 lines
494 B
Go
14 lines
494 B
Go
package rpchandlers
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/app/appmessage"
|
|
"github.com/kaspanet/kaspad/app/rpc/rpccontext"
|
|
"github.com/kaspanet/kaspad/infrastructure/network/netadapter/router"
|
|
)
|
|
|
|
// HandleGetBlockCount handles the respectively named RPC command
|
|
func HandleGetBlockCount(context *rpccontext.Context, _ *router.Router, _ appmessage.Message) (appmessage.Message, error) {
|
|
response := appmessage.NewGetBlockCountResponseMessage(context.DAG.BlockCount())
|
|
return response, nil
|
|
}
|