mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-24 18:21:38 +00:00
rpc: return (*Response, error) for all functions
This commit is contained in:
@ -18,10 +18,10 @@ type Receipt struct {
|
||||
|
||||
// pass pointer?
|
||||
// Note: tx must be signed
|
||||
func BroadcastTx(tx types.Tx) (Receipt, error) {
|
||||
func BroadcastTx(tx types.Tx) (*ResponseBroadcastTx, error) {
|
||||
err := mempoolReactor.BroadcastTx(tx)
|
||||
if err != nil {
|
||||
return Receipt{}, fmt.Errorf("Error broadcasting transaction: %v", err)
|
||||
return nil, fmt.Errorf("Error broadcasting transaction: %v", err)
|
||||
}
|
||||
|
||||
txHash := merkle.HashFromBinary(tx)
|
||||
@ -34,7 +34,7 @@ func BroadcastTx(tx types.Tx) (Receipt, error) {
|
||||
contractAddr = state.NewContractAddress(callTx.Input.Address, uint64(callTx.Input.Sequence))
|
||||
}
|
||||
}
|
||||
return Receipt{txHash, createsContract, contractAddr}, nil
|
||||
return &ResponseBroadcastTx{Receipt{txHash, createsContract, contractAddr}}, nil
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user