The very basic functionality of the Monero Adapter (of sybilAPI) is handshaking mechanism which enables peer connection between different Monero nodes.
The regression test test_verack_monero initiates emulated Monero node and tries to make a connection to the target Monero node.
In order to complete the connection process between two Monero nodes, version handshaking mechanism should be implemented. It should be implemented within OpAfterConnect callback function within Monero Adapter.
타겟 모네로 노드에 대해 연결을 맺고 유지하는 것까지 테스트 완료
tests/regtest/2_sybilAPI/4_verack_with_monero 폴더에 두개의 테스트를 만들었고, 제대로 동작하는지 확인함.
테스트 1. check.py
(monero adapter API를 사용한) 하나의 가상의 monero node를 생성하여, target Monero node에게 연결을 시키고, ping-pong 메시지(COMMAND_TIMED_SYNC 메시지)를 두번(1분 주기로 2회)까지 주고 받는지 확인
테스트 2 check_two.py
(monero adapter API를 사용한) 두개의 가상 monero node를 생성하여, target Monero node에게 연결을 시키고, 각각의 노드들이 target node와 ping-pong 메시지(COMMAND_TIMED_SYNC 메시지)를 두번(1분 주기로 2회)까지 주고 받는지 확인
The very basic functionality of the Monero Adapter (of sybilAPI) is handshaking mechanism which enables peer connection between different Monero nodes.
The regression test
test_verack_monero
initiates emulated Monero node and tries to make a connection to the target Monero node. In order to complete the connection process between two Monero nodes, version handshaking mechanism should be implemented. It should be implemented withinOpAfterConnect
callback function within Monero Adapter.Originally posted by @ygnkim in https://github.com/kaistshadow/blockchain-sim/issues/275#issuecomment-803721931