Browse Source

Demonstration readability improved. Clear how the State diff works.

cl-refactor
Gav Wood 10 years ago
parent
commit
bf3fbae397
  1. 6
      exp/main.cpp

6
exp/main.cpp

@ -85,14 +85,14 @@ int main()
s.addBalance(u.address(), 1 * ether); s.addBalance(u.address(), 1 * ether);
Address c = s.newContract(1000 * ether, compileLLL("(suicide (caller))")); Address c = s.newContract(1000 * ether, compileLLL("(suicide (caller))"));
s.commit(); s.commit();
cnote << s.rootHash();
State before = s; State before = s;
cnote << s; cnote << "State before transaction: " << before;
Transaction t(0, 10000, 10000, c, bytes(), 0, u.secret()); Transaction t(0, 10000, 10000, c, bytes(), 0, u.secret());
cnote << "Transaction: " << t;
cnote << s.balance(c); cnote << s.balance(c);
s.execute(t.rlp()); s.execute(t.rlp());
cnote << "State after transaction: " << s;
cnote << before.diff(s); cnote << before.diff(s);
cnote << s;
} }
#endif #endif

Loading…
Cancel
Save