deals: Sending initial proposal works
This commit is contained in:
committed by
whyrusleeping
parent
322031d8e4
commit
b65041cac1
@@ -7,6 +7,17 @@ import (
|
||||
"github.com/filecoin-project/go-lotus/lib/jsonrpc"
|
||||
)
|
||||
|
||||
// NewCommonRPC creates a new http jsonrpc client.
|
||||
func NewCommonRPC(addr string, requestHeader http.Header) (api.Common, error) {
|
||||
var res api.CommonStruct
|
||||
_, err := jsonrpc.NewMergeClient(addr, "Filecoin",
|
||||
[]interface{}{
|
||||
&res.Internal,
|
||||
}, requestHeader)
|
||||
|
||||
return &res, err
|
||||
}
|
||||
|
||||
// NewFullNodeRPC creates a new http jsonrpc client.
|
||||
func NewFullNodeRPC(addr string, requestHeader http.Header) (api.FullNode, error) {
|
||||
var res api.FullNodeStruct
|
||||
|
||||
Reference in New Issue
Block a user