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.
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.
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@.