mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #2314 from Algruun/patch-1
Rename events in purchase example
This commit is contained in:
commit
e43ff7979e
@ -566,9 +566,9 @@ Safe Remote Purchase
|
||||
_;
|
||||
}
|
||||
|
||||
event aborted();
|
||||
event purchaseConfirmed();
|
||||
event itemReceived();
|
||||
event Aborted();
|
||||
event PurchaseConfirmed();
|
||||
event ItemReceived();
|
||||
|
||||
/// Abort the purchase and reclaim the ether.
|
||||
/// Can only be called by the seller before
|
||||
@ -577,7 +577,7 @@ Safe Remote Purchase
|
||||
onlySeller
|
||||
inState(State.Created)
|
||||
{
|
||||
aborted();
|
||||
Aborted();
|
||||
state = State.Inactive;
|
||||
seller.transfer(this.balance);
|
||||
}
|
||||
@ -591,7 +591,7 @@ Safe Remote Purchase
|
||||
condition(msg.value == (2 * value))
|
||||
payable
|
||||
{
|
||||
purchaseConfirmed();
|
||||
PurchaseConfirmed();
|
||||
buyer = msg.sender;
|
||||
state = State.Locked;
|
||||
}
|
||||
@ -602,7 +602,7 @@ Safe Remote Purchase
|
||||
onlyBuyer
|
||||
inState(State.Locked)
|
||||
{
|
||||
itemReceived();
|
||||
ItemReceived();
|
||||
// It is important to change the state first because
|
||||
// otherwise, the contracts called using `send` below
|
||||
// can call in again here.
|
||||
|
Loading…
Reference in New Issue
Block a user