Commit Graph

165 Commits

Author SHA1 Message Date
JoelKatz
e07acea505 Complete the transaction-specific part of the ledger comparison logic. 2011-12-06 11:57:47 -08:00
JoelKatz
7375c1d22b Small buglet. 2011-12-05 15:03:56 -08:00
JoelKatz
9dcda53e70 The algorithm to find all the differences between two trees of transactions
or accounts. This is definitely either genius or madness. I'm just not quite
sure which.
2011-12-05 15:01:01 -08:00
JoelKatz
fe13406ef8 Some missing helper functions. 2011-12-05 15:00:47 -08:00
JoelKatz
f7d1539df4 Identify which hashes we're using. 2011-12-05 13:21:52 -08:00
JoelKatz
c220e6bcfc Public key in transaction must match *from* account. 2011-12-05 13:19:36 -08:00
JoelKatz
696c841ea3 Tie into PubKeyCache. 2011-12-04 19:34:18 -08:00
JoelKatz
65c09f3ce9 Tie into PubKeyCache. 2011-12-04 19:34:10 -08:00
JoelKatz
c8d9902044 Add smart pointers to CKey objects. 2011-12-04 19:33:49 -08:00
JoelKatz
3ba41220c3 Code to store/retrieve transactions. Tie into PubKeyCache. 2011-12-04 19:33:06 -08:00
JoelKatz
b1d66a1a0f Fix some small defects in the SQL layout. 2011-12-04 19:32:40 -08:00
JoelKatz
c891df0ef8 Complete public key cache logic and tie to application object. 2011-12-04 19:32:16 -08:00
JoelKatz
c52512e5e7 Consistent case. 2011-12-03 22:20:31 -08:00
JoelKatz
604c9721e9 The cache of IDs<->PubKeys. Also handles storing them to the SQL db. 2011-12-03 22:19:50 -08:00
JoelKatz
2dfb920db0 Some missing fields. 2011-12-03 21:49:35 -08:00
JoelKatz
7374943b13 Some fixes to the SQL statements. 2011-12-03 21:49:27 -08:00
JoelKatz
40054b5431 Make it easier for loaders/synchers to wait for replies. 2011-12-02 16:24:34 -08:00
JoelKatz
e236671ccc The length logic was backwards. 2011-12-02 16:24:24 -08:00
JoelKatz
d61c8ae013 Add static has function to save a copy. Use <0 for 'whole object', not 0. 2011-12-02 16:23:46 -08:00
JoelKatz
150a3165c4 Store hashes in hex form. It just makes things easier. 2011-12-02 16:23:31 -08:00
JoelKatz
e575fea243 Whitespace. 2011-12-02 16:23:21 -08:00
JoelKatz
70ee793a07 Use 'peek' to indicate a reference to someone else's object. 2011-12-02 16:23:02 -08:00
JoelKatz
46d6ae415b Cleanup. 2011-12-02 16:22:54 -08:00
JoelKatz
70d3ea2495 Storage for objects retrieved by hash. Implement SQL set/get logic. 2011-12-02 16:22:38 -08:00
JoelKatz
eaf4bc1b41 Small updates. 2011-12-02 16:22:25 -08:00
JoelKatz
089687152e The database is not reentrant, so we need a ScopedLock to gate it. 2011-12-02 16:22:10 -08:00
JoelKatz
26171e6dec Whitespace changes. 2011-12-02 16:21:59 -08:00
JoelKatz
f3ed8b7ec9 Updates, working to get the network code going. 2011-11-30 21:29:38 -08:00
JoelKatz
284445a7fa Start cleaning up the peer code. 2011-11-30 14:57:44 -08:00
JoelKatz
f243286bc9 Bugfixes and new code. Ledger unit test now successfully creates a local
account, creates an initial ledger, closes the initial ledger and opens a
new ledger, creates a second account, and adds a transaction to transfer
funds to the open ledger.
2011-11-30 12:19:48 -08:00
JoelKatz
b301fe2846 Whitespace 2011-11-29 16:44:08 -08:00
JoelKatz
dc8cd59c1d Fix some small bugs in the Ledger code. Add a unit test. (Needs more tests.) 2011-11-29 16:43:32 -08:00
JoelKatz
eb2efd5a3c Fix some typos. 2011-11-29 16:43:18 -08:00
JoelKatz
7572f0a3e3 Fix a bug where dirtying the root doesn't update the special root pointer. 2011-11-29 16:42:50 -08:00
JoelKatz
ff8b9aafa6 Remove debug code accidentally commited. 2011-11-29 16:22:17 -08:00
JoelKatz
66fec28ffe Cleanup, additional debug, and a very painful bugfix that turned out to be a
1 instead of a 0.
2011-11-29 11:26:45 -08:00
JoelKatz
10ca256063 Updates. 2011-11-29 11:23:53 -08:00
JoelKatz
11f9e111de Construct the next ledger from the existing ledger.
Close ledger logic.
2011-11-28 19:34:16 -08:00
JoelKatz
75f1eb80a4 Make these pieces work together. 2011-11-28 19:33:50 -08:00
JoelKatz
aee1e9f180 Bugfix. Add 16-bit types. 2011-11-28 14:02:33 -08:00
JoelKatz
ebb9a9c255 Build enough information into the leaf nodes so that they can be parsed
without knowledge of the objects they contain. This will allow new
transaction or account formats to be added (possibly with larger data sizes)
without breaking the ability to parse the hash trees. It also simplifies
the operation-specific tree code (since it doesn't have to parse the raw
leaf data).
2011-11-28 13:59:34 -08:00
JoelKatz
e87a027df2 Code to boostrap the initial ledger. 2011-11-26 00:57:31 -08:00
JoelKatz
06a9bc5520 Transaction status, REMOVED. 2011-11-25 21:53:12 -08:00
JoelKatz
fe3acce262 Some missing functions. 2011-11-25 21:52:54 -08:00
JoelKatz
badf382903 Note that 'insufficient funds' can occur when removing a transaction too, if
the funds have already been spent by another transaction. When removing a
transaction, any 'subsequent' dependent transactions must be removed first.
2011-11-25 21:51:30 -08:00
JoelKatz
d4030472e7 Cleanups. Function to fully remove/undo a transaction from a ledger. 2011-11-25 21:50:58 -08:00
JoelKatz
c6f50c8d59 Missing helper functions. 2011-11-25 21:50:50 -08:00
JoelKatz
d176e9d2c7 Bugfixes. isChildLeaf had wrong test. peekNextItem walked the wrong way. 2011-11-25 17:10:42 -08:00
JoelKatz
9eb8188627 Update 2011-11-25 13:52:33 -08:00
JoelKatz
01f5740add Endian fix. SHAMap now passes its (admittedly anemic right now) unit test. 2011-11-25 13:52:04 -08:00