mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Change SQL tables to suppot scaning.
This commit is contained in:
@@ -56,6 +56,7 @@ const char *WalletDBInit[] = {
|
|||||||
Comment TEXT \
|
Comment TEXT \
|
||||||
);",
|
);",
|
||||||
|
|
||||||
|
// Node identity must be persisted for CAS routing and responsibilites.
|
||||||
"CREATE TABLE NodeIdentity ( \
|
"CREATE TABLE NodeIdentity ( \
|
||||||
PublicKey CHARACTER(53), \
|
PublicKey CHARACTER(53), \
|
||||||
PrivateKey CHARACTER(52), \
|
PrivateKey CHARACTER(52), \
|
||||||
@@ -179,7 +180,7 @@ const char *WalletDBInit[] = {
|
|||||||
PRIMARY KEY (Validator,Entry) \
|
PRIMARY KEY (Validator,Entry) \
|
||||||
);",
|
);",
|
||||||
|
|
||||||
// Table of IPs to contact the nextwork.
|
// Table of IPs to contact the network.
|
||||||
// IP:
|
// IP:
|
||||||
// IP address to contact.
|
// IP address to contact.
|
||||||
// Port:
|
// Port:
|
||||||
@@ -192,17 +193,22 @@ const char *WalletDBInit[] = {
|
|||||||
// 'M' = Manually added.
|
// 'M' = Manually added.
|
||||||
// 'I' = Inbound connection.
|
// 'I' = Inbound connection.
|
||||||
// 'O' = Other.
|
// 'O' = Other.
|
||||||
// Contact:
|
// ScanNext:
|
||||||
// Time of last contact.
|
// When to next scan. Null=not scanning.
|
||||||
// XXX Update on connect and hourly.
|
// ScanInterval:
|
||||||
|
// Delay between scans.
|
||||||
"CREATE TABLE PeerIps ( \
|
"CREATE TABLE PeerIps ( \
|
||||||
IP TEXT NOT NULL, \
|
IP TEXT NOT NULL, \
|
||||||
Port INTEGER NOT NULL DEFAULT -1, \
|
Port INTEGER NOT NULL DEFAULT -1, \
|
||||||
Score INTEGER NOT NULL, \
|
Score INTEGER NOT NULL, \
|
||||||
Source CHARACTER(1) NOT NULL, \
|
Source CHARACTER(1) NOT NULL, \
|
||||||
Contact DATETIME, \
|
ScanNext DATETIME DEFAULT 0, \
|
||||||
PRIMARY KEY (IP,PORT) \
|
ScanInterval INTEGER NOT NULL DEFAULT 0, \
|
||||||
|
PRIMARY KEY (IP,Port) \
|
||||||
);",
|
);",
|
||||||
|
|
||||||
|
"CREATE INDEX PeerScanIndex ON \
|
||||||
|
PeerIps(ScanNext);"
|
||||||
};
|
};
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|||||||
Reference in New Issue
Block a user