Commit graph

6 commits

Author SHA1 Message Date
Dave Collins
2aca924514 Allow the Open/CreateDB funcs to take any params.
The specific parameters required by a backend is better left up to the
backend itself.  For example memdb has no need for a database path, while
ldb does.  This commit modifies the OpenDB and CreateDB functions to take
a arbitrary arguments which are passed along to the driver.  The driver is
expected to verify the correct type and number of arguments and error
accordingly.

The existing backends have been updated accordingly.
2014-01-19 20:13:21 -06:00
Dave Collins
6b18796af7 Add 2014 to copyright dates. 2014-01-08 23:54:52 -06:00
Dave Collins
d226968472 Add a new memory database backend named memdb.
This commit adds a new backend driver which conforms to the btcdb
interface to provide a memory only database.  This is primarily useful for
testing purposes as normal operations require a persistent block storage
mechanism.
2013-11-08 02:48:59 -06:00
Dave Collins
998682ec83 Remove sqlitedb from the common tests.
The sqlite db backend is now deprecated.
2013-10-22 15:28:32 -05:00
Dave Collins
562294f938 Add loadBlocks infrastructure to interface tests. 2013-10-14 12:26:34 -05:00
Dave Collins
a27c37793b Add basic infrastructure for interface tests.
This is simply at start at providing generic interface tests.  The only
thing is tests so far is the empty database conditions on NewestSha, but
it adds infrastructure for creating and opening databases with special
type handling based on the database and necessary logic to teardown so
multiple backends can be tested simultaneously.

This and the next series of commits all discussed with drahn@.
2013-10-14 12:26:12 -05:00