Merge 18403cd8ba
into ff408351a2
This commit is contained in:
commit
58ab7b9f9d
|
@ -12,6 +12,11 @@ func (cli *CLI) send(from, to string, amount int, nodeID string, mineNow bool) {
|
||||||
if !ValidateAddress(to) {
|
if !ValidateAddress(to) {
|
||||||
log.Panic("ERROR: Recipient address is not valid")
|
log.Panic("ERROR: Recipient address is not valid")
|
||||||
}
|
}
|
||||||
|
if to == from {
|
||||||
|
log.Panic("ERROR: You cannot send coins to yourself")
|
||||||
|
} else if from == to {
|
||||||
|
log.Panic("ERROR: You cannot send coins to yourself")
|
||||||
|
}
|
||||||
|
|
||||||
bc := NewBlockchain(nodeID)
|
bc := NewBlockchain(nodeID)
|
||||||
UTXOSet := UTXOSet{bc}
|
UTXOSet := UTXOSet{bc}
|
||||||
|
|
Loading…
Reference in New Issue