//"chain/protocol/bc/legacy"
//"github.com/consensus/types"
//. "github.com/tendermint/tmlibs/common"sour
+ "github.com/blockchain/protocol/bc/legacy"
)
//for simulate
}
-func SubmitWork(blkheader ctypes.ResultBlockHeaderInfo) (bool,error) {
+//func SubmitWork(blkheader ctypes.ResultBlockHeaderInfo) (bool,error) {
+func SubmitWork(height uint64) (bool,error) {
+ block := legacy.Block{
+ BlockHeader: legacy.BlockHeader{
+ Version: 1,
+ Height: height,
+ },
+ }
+ blockStore.SaveBlock(&block)
return true,nil
}
// "status": rpc.NewRPCFunc(Status, ""),
"net_info": rpc.NewRPCFunc(NetInfo, ""),
"getwork": rpc.NewRPCFunc(GetWork, ""),
- "submitwork": rpc.NewRPCFunc(SubmitWork, ""),
+ "submitwork": rpc.NewRPCFunc(SubmitWork, "height"),
// "blockchain": rpc.NewRPCFunc(BlockchainInfo, "minHeight,maxHeight"),
// "genesis": rpc.NewRPCFunc(Genesis, ""),
// "block": rpc.NewRPCFunc(Block, "height"),