Messages
MsgSend
type MsgSend struct {
Inputs []Input
Outputs []Output
}
1
2
3
4
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
2
3
4
5
6
7
8
9
10
11