Commit Graph

2960 Commits

Author SHA1 Message Date
Mike Hearn
2455776b43 Cash contract: Implement example of spend crafting. 2015-11-04 15:14:56 +01:00
Mike Hearn
a09120d445 Cash contract: Introduce a DepositPointer abstraction for easier grouping
In this current model, you cannot mix up money from different deposits: they must always be kept separate.
2015-11-03 18:05:21 +01:00
Mike Hearn
fd67a85c29 TDD: Cash contract: Some basic tests of spend crafting. 2015-11-03 17:54:18 +01:00
Mike Hearn
e012d2c2f5 TestUtils: add some formatting toString methods to make test failures easier to read. 2015-11-03 17:54:18 +01:00
Mike Hearn
0c6c2df483 Cash contract: don't allow merging of two different origin deposits together. 2015-11-03 17:54:18 +01:00
Mike Hearn
8f46fb4406 Introduce OpaqueBytes, a simple wrapper around the JVM level byte[] which fixes hashCode and equals to use value-type identity rather than instance identity. Allows for more natural code. 2015-11-03 17:54:18 +01:00
Mike Hearn
12f5ddb0aa Cash contract: multi-issuer support
You can now take deposits from multiple different institutions and move/combine/split them appropriately. The issuers are kept separate, you cannot merge 3 different input states from 3 different institutions down to one, but you can merge/split within that specific issuer. Deposit refs are not currently being kept separate, but they should be also (this is coming next).
2015-11-03 17:54:18 +01:00
Mike Hearn
ce3d339c62 Give nicer backtraces in tests by just throwing AssertionError directly, document the test DSL 2015-11-03 17:54:18 +01:00
Mike Hearn
983003a562 Amount: split out of Structures.kt and into a separate file, add operator overloads. 2015-11-03 17:54:18 +01:00
Mike Hearn
c60db5544b Initial import 2015-11-03 17:54:17 +01:00