Messages

MsgSend

type MsgSend struct {
  Inputs  []Input
  Outputs []Output
}
1
2
3
4

handleMsgSend just runs inputOutputCoins.

handleMsgSend(msg MsgSend)
  inputSum = 0
  for input in inputs
    inputSum += input.Amount
  outputSum = 0
  for output in outputs
    outputSum += output.Amount
  if inputSum != outputSum:
    fail with "input/output amount mismatch"

  return inputOutputCoins(msg.Inputs, msg.Outputs)
1
2
3
4
5
6
7
8
9
10
11
Last Updated: 2/21/2019, 2:21:57 AM