itest+lntest: return the error from SendCoinsAssertErr
Also rename the send all coins test for clarity.
This commit is contained in:
3 files changed
+19
-11
No files matched your search
+3
-1
@@ -378,12 +378,14 @@ func (h *HarnessRPC) SendCoins(
|
||||
|
||||
// SendCoinsAssertErr sends a given amount of money to the specified address
|
||||
// from the passed node and asserts an error has returned.
|
||||
func (h *HarnessRPC) SendCoinsAssertErr(req *lnrpc.SendCoinsRequest) {
|
||||
func (h *HarnessRPC) SendCoinsAssertErr(req *lnrpc.SendCoinsRequest) error {
|
||||
ctxt, cancel := context.WithTimeout(h.runCtx, DefaultTimeout)
|
||||
defer cancel()
|
||||
|
||||
_, err := h.LN.SendCoins(ctxt, req)
|
||||
require.Error(h, err, "node %s didn't not return an error", h.Name)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// GetTransactions makes a RPC call to GetTransactions and asserts.
|
||||
|
||||
Reference in new issue
Block a user