parse leveldb for txs.
This commit is contained in:
parent
e25d11d00e
commit
f057ec71a6
@ -2019,7 +2019,7 @@ async_get_addrtx(uv_work_t *req) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 1
|
#if 0
|
||||||
CScript expected = GetScriptForDestination(address.Get());
|
CScript expected = GetScriptForDestination(address.Get());
|
||||||
|
|
||||||
int64_t i = 0;
|
int64_t i = 0;
|
||||||
@ -2086,10 +2086,10 @@ done:
|
|||||||
#else
|
#else
|
||||||
ctx_list *ctxs = read_addr(data->addr);
|
ctx_list *ctxs = read_addr(data->addr);
|
||||||
data->ctxs = ctxs;
|
data->ctxs = ctxs;
|
||||||
#endif
|
|
||||||
if (data->ctxs == NULL) {
|
if (data->ctxs == NULL) {
|
||||||
data->err_msg = std::string("Could not read database.");
|
data->err_msg = std::string("Could not read database.");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -5632,9 +5632,7 @@ class TwoPartComparator : public leveldb::Comparator {
|
|||||||
const char *k = key_.c_str();
|
const char *k = key_.c_str();
|
||||||
const char *e = end_.c_str();
|
const char *e = end_.c_str();
|
||||||
|
|
||||||
if (k[0] == 't'
|
if (k[0] == 't') {
|
||||||
&& k[1] == 'x'
|
|
||||||
&& k[2] == '-') {
|
|
||||||
unsigned int el = strlen(e);
|
unsigned int el = strlen(e);
|
||||||
if (k[el - 1] == '\0' || k[el - 1] == e[el - 1]) {
|
if (k[el - 1] == '\0' || k[el - 1] == e[el - 1]) {
|
||||||
return 1;
|
return 1;
|
||||||
@ -5707,8 +5705,8 @@ read_addr(const std::string addr) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
leveldb::Slice start = "tx-" + addr + "-";
|
leveldb::Slice start = "t";
|
||||||
leveldb::Slice end = "tx-" + addr + "-~";
|
leveldb::Slice end = "t\xFF";
|
||||||
//leveldb::Options options;
|
//leveldb::Options options;
|
||||||
|
|
||||||
leveldb::Iterator* it = pdb->NewIterator(leveldb::ReadOptions());
|
leveldb::Iterator* it = pdb->NewIterator(leveldb::ReadOptions());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user