Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ codechain-state = { path = "state" }
codechain-sync = { path = "sync" }
codechain-timer = { path = "util/timer" }
codechain-types = { path = "types" }
codechain-vm = { path = "vm" }
codechain-stratum = { path = "stratum" }
ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git" }
fdlimit = "0.1"
Expand Down Expand Up @@ -74,5 +73,4 @@ members = [
"rpc",
"sync",
"types",
"vm",
]
1 change: 0 additions & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ codechain-state = { path = "../state" }
codechain-timer = { path = "../util/timer" }
codechain-types = { path = "../types" }
codechain-stratum = { path = "../stratum" }
codechain-vm = { path = "../vm" }
crossbeam-channel = "0.3"
cuckoo = { git = "https://github.com/CodeChain-io/rust-cuckoo.git", rev = "280cab9c" }
hyper = { git = "https://github.com/paritytech/hyper", default-features = false }
Expand Down
18 changes: 0 additions & 18 deletions core/res/beagle.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,5 @@
"bccqyczcz3lgeun43tujs5fkygfg4phvuk2gcs2sny0": {
"balance": "10000000000"
}
},
"shards": {
"0": {
"seq": 0,
"owners": [
"bccqypclxxrlr8f9n75dt6ayasvkdkxx6k3qgedauzj",
"bccqy204w0m6stuahxlx3p58kc0hsgd42npqcrx8lce",
"bccqxkppqfqwwl6vwge62qq22eh3xkmzqwvschr8thm",
"bccq8mjrws63vw27na5t6nxjf5yvjhpac5nyga4psjx",
"bccq9apfpuhwe5m62ejpfyxtmad2536xj9sfqpdt76p",
"bccq8yrcc4tlwlfrtmuaewv9u9fv9xjfj9czsfeyra7",
"bccqy9tavttkl87gscjmkpmc56evz3m42ugxclxwp2h",
"bccq8ah0efv5ckpx6wy5mwva2aklzwsdw027s4t6vux",
"bccqyfrwupcdmj85gzam90yua50qz3mkgskgudmg7df",
"bccqyczcz3lgeun43tujs5fkygfg4phvuk2gcs2sny0"
],
"users": []
}
}
}
7 changes: 0 additions & 7 deletions core/res/blake_pow.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,5 @@
"tccqyqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpqc2ul2h": { "balance": "1000000" },
"tccq8vapdlstar6ghmqgczp6j2e83njsqq0tsvaxm9u": { "balance": "1000000" },
"tccq9h7vnl68frvqapzv3tujrxtxtwqdnxw6yamrrgd": { "balance": "10000000000000000000", "seq": "0" }
},
"shards": {
"0": {
"seq": 0,
"owners": ["tccq8vapdlstar6ghmqgczp6j2e83njsqq0tsvaxm9u"],
"users": []
}
}
}
7 changes: 0 additions & 7 deletions core/res/corgi.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,5 @@
},
"accounts": {
"wccqx6n79wgvye8l8rx49xuqvm3vtwkffz28sff8axv": { "balance": "2100000000000000000", "seq": "0" }
},
"shards": {
"0": {
"seq": 0,
"owners": ["wccqx6n79wgvye8l8rx49xuqvm3vtwkffz28sff8axv"],
"users": []
}
}
}
7 changes: 0 additions & 7 deletions core/res/cuckoo.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,5 @@
"tccqyqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpqc2ul2h": { "balance": "1000000" },
"tccq8vapdlstar6ghmqgczp6j2e83njsqq0tsvaxm9u": { "balance": "1000000" },
"tccq9h7vnl68frvqapzv3tujrxtxtwqdnxw6yamrrgd": { "balance": "10000000000000000000", "seq": "0" }
},
"shards": {
"0": {
"seq": 0,
"owners": ["tccq8vapdlstar6ghmqgczp6j2e83njsqq0tsvaxm9u"],
"users": []
}
}
}
7 changes: 0 additions & 7 deletions core/res/husky.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,5 @@
},
"accounts": {
"tccqynz79luhx4cfakvcqe29rwaajnkzz6aev5deztu": { "balance": "2100000000000000", "seq": "0" }
},
"shards": {
"0": {
"seq": 0,
"owners": ["tccqynz79luhx4cfakvcqe29rwaajnkzz6aev5deztu"],
"users": []
}
}
}
18 changes: 0 additions & 18 deletions core/res/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,23 +130,5 @@
"cccq8dhpcfqt94mx8dntxxd6420782vtd4tpvpgcgjh": {
"balance": "10000000000"
}
},
"shards": {
"0": {
"seq": 0,
"owners": [
"cccq8u8se8k00vcqk4pl707qe9v60hs3jj27g4rqkm9",
"cccq9hpz4m5sx0ea42l2hfm8nja0xzzsnx0vv0p7mzw",
"cccqxgwashdy0fp5cwlvp4ntkzmy3xvjedfjgfzrxf7",
"cccq9g0ayvrvmzcs2qf8yygat0dg9073g5xccd3sydw",
"cccq8r9as2drgp4xwfzz7t0xc9k977y8mw7hus3zq8e",
"cccqx7ycl2awx6awqyjf9ns4532xj7eg63w6v6hlnu0",
"cccq826j0p6fvpk02p0n5th7ukqu5clrnyldcxgrgtz",
"cccqyhk4388mymckk40ctf0skgkl8nf89f6sgpzwzke",
"cccqxgupxd5j0squ7t8w3etxjf0fn2z4axz0spycqum",
"cccq8dhpcfqt94mx8dntxxd6420782vtd4tpvpgcgjh"
],
"users": []
}
}
}
7 changes: 0 additions & 7 deletions core/res/null.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,5 @@
"tccqyqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpqc2ul2h": { "balance": "1000000" },
"tccq8vapdlstar6ghmqgczp6j2e83njsqq0tsvaxm9u": { "balance": "1000000" },
"tccq9h7vnl68frvqapzv3tujrxtxtwqdnxw6yamrrgd": { "balance": "10000000000000000000", "seq": "0" }
},
"shards": {
"0": {
"seq": 0,
"owners": ["tccq8vapdlstar6ghmqgczp6j2e83njsqq0tsvaxm9u"],
"users": []
}
}
}
7 changes: 0 additions & 7 deletions core/res/saluki.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,5 @@
},
"accounts": {
"sccqx74ftz8ct6yks4mq3u06g2wt07zxfqrss777pj2": { "balance": "2100000000000000000", "seq": "0" }
},
"shards": {
"0": {
"seq": 0,
"owners": ["sccqx74ftz8ct6yks4mq3u06g2wt07zxfqrss777pj2"],
"users": []
}
}
}
7 changes: 0 additions & 7 deletions core/res/simple_poa.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,5 @@
"tccqyqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpqc2ul2h": { "balance": "1000000" },
"tccq8vapdlstar6ghmqgczp6j2e83njsqq0tsvaxm9u": { "balance": "1000000" },
"tccq9h7vnl68frvqapzv3tujrxtxtwqdnxw6yamrrgd": { "balance": "10000000000000000000", "seq": "0" }
},
"shards": {
"0": {
"seq": 0,
"owners": ["tccq8vapdlstar6ghmqgczp6j2e83njsqq0tsvaxm9u"],
"users": []
}
}
}
7 changes: 0 additions & 7 deletions core/res/solo.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,5 @@
"tccqyqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpqc2ul2h": { "balance": "1000000" },
"tccq8vapdlstar6ghmqgczp6j2e83njsqq0tsvaxm9u": { "balance": "1000000" },
"tccq9h7vnl68frvqapzv3tujrxtxtwqdnxw6yamrrgd": { "balance": "10000000000000000000", "seq": "0" }
},
"shards": {
"0": {
"seq": 0,
"owners": ["tccq8vapdlstar6ghmqgczp6j2e83njsqq0tsvaxm9u"],
"users": []
}
}
}
7 changes: 0 additions & 7 deletions core/res/tendermint.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,5 @@
"tccqyqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpqc2ul2h": { "balance": "1000000" },
"tccq8vapdlstar6ghmqgczp6j2e83njsqq0tsvaxm9u": { "balance": "1000000" },
"tccq9h7vnl68frvqapzv3tujrxtxtwqdnxw6yamrrgd": { "balance": "10000000000000000000", "seq": "0" }
},
"shards": {
"0": {
"seq": 0,
"owners": ["tccq8vapdlstar6ghmqgczp6j2e83njsqq0tsvaxm9u"],
"users": []
}
}
}
9 changes: 3 additions & 6 deletions core/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ use ctypes::errors::HistoryError;
use ctypes::header::{Header, Seal};
use ctypes::util::unexpected::Mismatch;
use ctypes::{BlockNumber, CommonParams, TxHash};
use cvm::ChainTimeInfo;
use primitives::{Bytes, H256};
use rlp::{Decodable, DecoderError, Encodable, Rlp, RlpStream};

Expand Down Expand Up @@ -151,7 +150,7 @@ impl<'x> OpenBlock<'x> {
}

/// Push a transaction into the block.
pub fn push_transaction<C: ChainTimeInfo + FindActionHandler>(
pub fn push_transaction<C: FindActionHandler>(
&mut self,
tx: SignedTransaction,
h: Option<TxHash>,
Expand All @@ -164,7 +163,6 @@ impl<'x> OpenBlock<'x> {
}

let hash = tx.hash();
let tracker = tx.tracker();
let error = match self.block.state.apply(
&tx,
&hash,
Expand All @@ -183,7 +181,6 @@ impl<'x> OpenBlock<'x> {
};
self.block.invoices.push(Invoice {
hash,
tracker,
error: error.clone().map(|err| err.to_string()),
});

Expand All @@ -194,7 +191,7 @@ impl<'x> OpenBlock<'x> {
}

/// Push transactions onto the block.
pub fn push_transactions<C: ChainTimeInfo + FindActionHandler>(
pub fn push_transactions<C: FindActionHandler>(
&mut self,
transactions: &[SignedTransaction],
client: &C,
Expand Down Expand Up @@ -481,7 +478,7 @@ impl IsBlock for SealedBlock {
}

/// Enact the block given by block header, transactions and uncles
pub fn enact<C: ChainTimeInfo + EngineInfo + FindActionHandler + TermInfo>(
pub fn enact<C: EngineInfo + FindActionHandler + TermInfo>(
header: &Header,
transactions: &[SignedTransaction],
engine: &dyn CodeChainEngine,
Expand Down
12 changes: 2 additions & 10 deletions core/src/blockchain/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

use std::sync::Arc;

use ctypes::{BlockHash, BlockNumber, Tracker, TxHash};
use ctypes::{BlockHash, BlockNumber, TxHash};
use kvdb::{DBTransaction, KeyValueDB};
use parking_lot::RwLock;
use primitives::H256;
Expand Down Expand Up @@ -141,7 +141,7 @@ impl BlockChain {
self.body_db.insert_body(batch, &new_block);
self.body_db.update_best_block(batch, &best_block_changed);
for invoice in invoices {
self.invoice_db.insert_invoice(batch, invoice.hash, invoice.tracker, invoice.error);
self.invoice_db.insert_invoice(batch, invoice.hash, invoice.error);
}

if let Some(best_block_hash) = best_block_changed.new_best_hash() {
Expand Down Expand Up @@ -415,10 +415,6 @@ impl BodyProvider for BlockChain {
self.body_db.transaction_address(hash)
}

fn transaction_address_by_tracker(&self, tracker: &Tracker) -> Option<TransactionAddress> {
self.body_db.transaction_address_by_tracker(tracker)
}

fn block_body(&self, hash: &BlockHash) -> Option<encoded::Body> {
self.body_db.block_body(hash)
}
Expand All @@ -430,10 +426,6 @@ impl InvoiceProvider for BlockChain {
self.invoice_db.is_known_error_hint(hash)
}

fn error_hints_by_tracker(&self, tracker: &Tracker) -> Vec<(TxHash, Option<String>)> {
self.invoice_db.error_hints_by_tracker(tracker)
}

fn error_hint(&self, hash: &TxHash) -> Option<String> {
self.invoice_db.error_hint(hash)
}
Expand Down
Loading