Skip to content
Snippets Groups Projects
Commit 03409f61 authored by Moul's avatar Moul
Browse files

[lint] Use duplicating duniterpy.api.bma.network.PEERING_SCHEMA

parent 7185e8f1
No related branches found
No related tags found
2 merge requests!128Release 0.62.0,!123#147: Support pylint v2.7.1 R0801 rule
Pipeline #11090 waiting for manual action
......@@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import logging
from duniterpy.api.bma.blockchain import BLOCK_SCHEMA
from duniterpy.api.bma.network import PEERING_SCHEMA
from duniterpy.api.client import Client, WSConnection
logger = logging.getLogger("duniter/ws")
......@@ -25,18 +26,7 @@ logger = logging.getLogger("duniter/ws")
MODULE = "ws"
WS_BLOCK_SCHEMA = BLOCK_SCHEMA
WS_PEER_SCHEMA = {
"type": "object",
"properties": {
"version": {"type": "number"},
"currency": {"type": "string"},
"pubkey": {"type": "string"},
"endpoints": {"type": "array", "items": {"type": "string"}},
"signature": {"type": "string"},
},
"required": ["version", "currency", "pubkey", "endpoints", "signature"],
}
WS_PEER_SCHEMA = PEERING_SCHEMA
async def block(client: Client) -> WSConnection:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment