Commit 240285c2 authored by Éloïs's avatar Éloïs

fix accept algorithm and add block example

parent 163c5511
......@@ -203,8 +203,9 @@ When the timeout is reached, if the request has not been fully processed, it is
In cases where the request is fully processed before the timeout, the response is determined according to the following algorithm :
If the public key of the remote node is the same as yourself
If the uuid is not the same, accept the connection. Otherwise, refuse connection. (do not accept oneself connetion).
If the public key of the remote node is the same as yourself {
If the uuid is not the same, accept the connection. Otherwise, refuse connection. (do not accept oneself connetion).
}
If the pubkey is banned, refuse connection.
If priorityKeysOnly is enable and the pubkey isn't privileged, refuse connection.
If there is already an active ws2p connection with this key (whether incoming or outcoming), refuse connection.
......@@ -479,6 +480,66 @@ JSON error response :
err: String(error message)
}
BLOCK_IN_JSON_FORMAT Exemple :
Object({
"actives": Array(
[]
),
"certifications": Array(
[]
),
"currency": String(
"g1"
),
"dividend": Null,
"excluded": Array(
[]
),
"fork": Bool(
false
),
"hash": String(
"000002EFB4B9524708F751497A30811422824D14C3C710D99FBFA93F23E5BC0B"
),
"identities": Array(
[]
),
"inner_hash": String(
"00FD7CCE07B97A13F7B98B6506A9D3EE90A407E003285C664274A2B43E2778B9"
),
"issuer": String(
"FVUFRrk1K5TQGsY7PRLwqHgdHRoHrwb1hcucp4C2N5tD"
),
"issuersCount": Number(
37
),
"issuersFrame": Number(
183
),
"issuersFrameVar": Number(
3
),
"joiners": Array([]),
"leavers": Array([]),
"medianTime": Number(1528981976),
"membersCount": Number(1135),
"monetaryMass": Number(215441409),
"nonce": Number(10400000005428),
"number": Number(128238),
"parameters": String(""),
"powMin": Number(90),
"previousHash": String("000003C8220C8F2AA297AC43CF74943ADEE3EBE9715136CF5AA2CBD952AF04F3"),
"previousIssuer": String("GEWmVzmiKM6RGJsNaE7VcdNdf2T31xSnu6nHXdxuoSmd"),
"revoked": Array([]),
"signature": String("I64oQrF9bDPILLGHjw0tclgHgI75I2yIZSCS5quiXaOUd8ho2QyKrgcDNC6FhhSpyirCfLcyPCXFGDxBy/LKDw=="),
"time": Number(1528986264),
"transactions": Array([]),
"unitbase": Number(0),
"version": Number(10),
"wrong": Bool(false)
})
### getBlock
JSON Message :
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment