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