mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-05-25 00:33:20 +08:00
stub out a block database and a state database for the stacks blockchain
This commit is contained in:
36
src/chainstate/stacks/db/blockdb.rs
Normal file
36
src/chainstate/stacks/db/blockdb.rs
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
copyright: (c) 2013-2019 by Blockstack PBC, a public benefit corporation.
|
||||
|
||||
This file is part of Blockstack.
|
||||
|
||||
Blockstack is free software. You may redistribute or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License or
|
||||
(at your option) any later version.
|
||||
|
||||
Blockstack is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY, including without the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Blockstack. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use rusqlite::{Connection, OpenFlags, NO_PARAMS};
|
||||
use rusqlite::types::ToSql;
|
||||
use rusqlite::Row;
|
||||
use rusqlite::Transaction;
|
||||
|
||||
use std::fs;
|
||||
use std::convert::From;
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use chainstate::{FromRow, RowOrder};
|
||||
use chainstate::ChainstateDB;
|
||||
use chainstate::Error as db_error;
|
||||
|
||||
use util::log;
|
||||
use util::hash::{to_hex, hex_bytes, Hash160};
|
||||
|
||||
|
||||
21
src/chainstate/stacks/db/mod.rs
Normal file
21
src/chainstate/stacks/db/mod.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
copyright: (c) 2013-2019 by Blockstack PBC, a public benefit corporation.
|
||||
|
||||
This file is part of Blockstack.
|
||||
|
||||
Blockstack is free software. You may redistribute or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License or
|
||||
(at your option) any later version.
|
||||
|
||||
Blockstack is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY, including without the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Blockstack. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
pub mod blockdb;
|
||||
pub mod statedb;
|
||||
22
src/chainstate/stacks/db/statedb.rs
Normal file
22
src/chainstate/stacks/db/statedb.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
copyright: (c) 2013-2019 by Blockstack PBC, a public benefit corporation.
|
||||
|
||||
This file is part of Blockstack.
|
||||
|
||||
Blockstack is free software. You may redistribute or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License or
|
||||
(at your option) any later version.
|
||||
|
||||
Blockstack is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY, including without the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Blockstack. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// HAMT?
|
||||
// updateable history tree?
|
||||
// -- on insert, update pointer to latest account version by address
|
||||
Reference in New Issue
Block a user