Documentation ¶
Index ¶
Constants ¶
const ( MAX_COLUMNS = 50 // Maximum columns in tables MAX_INDEXES = 10 // Maximum indexes in tables )
const ALERT_ERROR_TIME = 1
const ALERT_KEY = `` /* 588-byte string literal not displayed */
const BLOCKCHAIN_SIZE = 1000
Approximate blockchain size
const BLOCKCHAIN_URL = "https://raw.githubusercontent.com/egaas-blockchain/egaas-blockchain.github.io/master/testnet_blockchain"
Where is blockchain. For those who don't want to collect it from nodes
const CHANGE_KEY_PERIOD = 86400 * 7
const COMMISSION = 1000
const COMMISSION_WALLET = 8275283526439353759
const COUNT_BLOCK_BEFORE_SAVE = RB_BLOCKS_2
const COUNT_CONFIRMED_NODES = 5
is used in confirmations
const DATA_TYPE_BLOCK_BODY = 7
const DATA_TYPE_MAX_BLOCK_ID = 10
const EGS_DIGIT = 18 //money_digit for EGS 1000000000000000000
const ERROR_TIME = 3
const FIRST_QDLT = 1e+26
const GAPS_BETWEEN_BLOCKS = 3
const GOOGLE_API_KEY = "AIzaSyBLZlUPgd9uhX05OrsFU68yJOZFrYhZe84"
const LAST_BLOCK = 330000
Approximate current last block
const MAX_BLOCK_SIZE = 64 << 20
const MAX_BLOCK_USER_TXS = 100
const MAX_TX_BACK = 86400
transaction may wander in the net for a day and then get into a block
const MAX_TX_COUNT = 100000
const MAX_TX_FORW = 0
How fast could the time of transaction pass
const MAX_TX_SIZE = 32 << 20
const MIN_CONFIRMED_NODES = 0
The number of nodes which should have the same block as we have for regarding this block belongs to the major part of DC-net. For get_confirmed_block_id()
const OUT_CONNECTIONS = 10
default value, with how many nodes we make the connection
const RATE_VOTING_PERIOD = 3600
const RB_BLOCKS_1 = 30
const RB_BLOCKS_2 = 1440
const READ_TIMEOUT = 20
timeouts for TCP
const RECOVERY_ADDRESS = 8275283526439353759
const ROUND_FIX = 0.00000000001
const TCP_PORT = "7078"
const ( // TxfPublic is the flag of TXHeader TxfPublic = 0x01 // Append PublicKey to Sign in TXHeader )
const UPD_AND_VER_URL = "http://egaas.org"
const UPD_FULL_NODES_PERIOD = 3600 // is for the test time, then we have to put 86400
const VERSION = "0.1.7b1"
Current version
const WAIT_CONFIRMED_NODES = 10
const WRITE_TIMEOUT = 20
Variables ¶
var Countries = []string{} /* 245 elements not displayed */
Countries is the list of the countries
var LangMap = map[string]int{"en": 1, "ru": 42}
LangMap contains supported languages
var TxTypes = map[int]string{
1: "FirstBlock",
2: "Reserved1",
3: "Reserved2",
4: "Reserved3",
5: "DLTTransfer",
6: "DLTChangeHostVote",
7: "UpdFullNodes",
8: "ChangeNodeKey",
9: "NewState",
10: "NewColumn",
11: "NewTable",
12: "EditPage",
13: "EditMenu",
14: "EditContract",
15: "NewContract",
16: "EditColumn",
17: "EditTable",
18: "EditStateParameters",
19: "NewStateParameters",
20: "NewPage",
21: "NewMenu",
22: "ChangeNodeKeyDLT",
23: "AppendPage",
24: "RestoreAccessActive",
25: "RestoreAccessClose",
26: "RestoreAccessRequest",
27: "RestoreAccess",
28: "NewLang",
29: "EditLang",
30: "AppendMenu",
31: "NewSign",
32: "EditSign",
33: "EditWallet",
34: "ActivateContract",
35: "NewAccount",
}
TxTypes is the list of the embedded transactions
Functions ¶
func MakeStruct ¶
func MakeStruct(name string) interface{}
MakeStruct is only used for FirstBlock now
Types ¶
type BlockHeader ¶
type BlockHeader struct { Type byte BlockID uint32 Time uint32 WalletID int64 StateID byte Sign []byte }
BlockHeader is a structure of the block header
type CitizenRequest ¶
CitizenRequest isn't used
type FirstBlock ¶
FirstBlock is the header of FirstBlock transaction
type NewCitizen ¶
NewCitizen isn't used