Skip to content

Commit

Permalink
zold-io#16 rearanged puzzles
Browse files Browse the repository at this point in the history
Vatavuk committed Aug 12, 2018
1 parent 7f7651e commit 9cc6e8a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/main/java/io/zold/api/Wallet.java
Original file line number Diff line number Diff line change
@@ -44,6 +44,10 @@
/**
* Wallet.
* @since 0.1
* @todo: #16:30min Merge method should update transactions
* in wallet's file and return concrete implementation not a fake one.
* Beware that tests should be refactored to take care of file cleanup
* after each case that merges wallets.
*/
@SuppressWarnings({"PMD.ShortMethodName", "PMD.TooManyMethods"})
public interface Wallet {
@@ -187,7 +191,6 @@ public void pay(final long amt, final long bnf) throws IOException {
}
}

@Override
// @todo #16:30min Following transactions should be ignored according
// to the whitepaper:
// a) If the transaction is negative and its signature is not valid,
@@ -197,12 +200,7 @@ public void pay(final long amt, final long bnf) throws IOException {
// c) If the transaction is positive and it’s absent in the paying
// wallet (which exists at the node), it’s ignored; If the paying
// wallet doesn’t exist at the node, the transaction is ignored;
//
// @todo: #16:30min Merge method should update transactions
// in wallet's file and return concrete implementation not a fake one.
// Beware that tests should be refactored to take care of file cleanup
// after each case that merges wallets.
//
@Override
public Wallet merge(final Wallet other) throws IOException {
if (other.id() != this.id()) {
throw new IOException(

0 comments on commit 9cc6e8a

Please sign in to comment.