Commit graph

513 commits

Author SHA1 Message Date
Severiano Jaramillo
1f0d616744 Modify autoConnect and verifyLatency behavior
- Added a check to make sure autoConnect=false and verifyLatency=false throw an exception, since that combination would cause the app to never connect to a node.
- Separeted the verifyLatency and autoConnect logic, so that the apps using NetworkService can decide wether to connect or not automatically, independently of verifying the latency.
2019-06-17 16:53:35 -05:00
Nelson R. Perez
562955586b Preventing a potential problem at the NetworkServiceManager and introducing some getters
- Preventing accidentally calling the 'bindService' twice at the NetworkServiceManager
- Providing a getter for the node list at the NodeLatencyVerifier
- Created a getter for the NodeLatencyVerifier at the NetworkService
2019-06-13 07:49:36 -05:00
Nelson R. Perez
b032db80bc Preventing a NPE
- We're now checking that there is a selected node before trying to use it, and in case there is none we schedule a
retry in DEFAULT_INITIAL_DELAY ms.
2019-06-06 15:59:55 -05:00
Severiano Jaramillo
b5e2961834 Convert NetworkService's sendMessage to synchronized, to guarantee thread safety: to avoid issues when calling that method from different threads. 2019-05-22 13:48:49 -05:00
Nelson R. Perez
d29f937045 Updated gradle version 2019-05-06 16:02:40 -05:00
Nelson R. Perez
65b7fef97f Merge branch 'develop' of github.com:Agorise/graphenej into develop 2019-04-04 15:12:47 -05:00
Nelson R. Perez
d72e608807 - Added the required deserialization logic to parse the response to the 'get_objects' API call with an asset bitasset data type
- Removed unresponsive node URLs from the sample app
2019-04-04 15:12:09 -05:00
Nelson R. Perez
c861c72a31 Added a brainkey derivation feature to the sample app 2019-04-04 11:47:35 -05:00
Severiano Jaramillo
8da72ab26a Fixed issue with the GetLimitOrders call in the demo app. It was not showing the correct fields to enter the necessary data to perform a test call. 2019-03-22 14:25:15 -06:00
Nelson R. Perez
d0d1e79ab7 Updated the gradle plugin version 2019-03-14 13:17:00 -05:00
Nelson R. Perez
8b7b3deafe Added a few more test cases for the memo decoding 2019-02-23 21:33:09 -05:00
Nelson R. Perez
954cf3e16d Merge branch 'develop' of github.com:Agorise/graphenej into develop 2019-02-22 18:25:52 -05:00
Nelson R. Perez
eb5a604fba - Added equals() and hashCode() to the Address class
- Fixed potential exception at Util.decryptAES() method
2019-02-22 18:25:36 -05:00
Severiano Jaramillo
1004873d98 Merge branch 'develop' of github.com:Agorise/graphenej into develop 2019-02-14 20:13:31 -06:00
Nelson R. Perez
f11aff72e6 Using existing instance of Handler instead of creating a new one 2019-02-13 23:30:49 -05:00
Nelson R. Perez
4181141b4e Actually updating the node latency 2019-02-13 23:30:25 -05:00
Severiano Jaramillo
e8b3746d66 Update Gradle version to 3.3.1 2019-02-09 12:47:25 -06:00
Nelson R. Perez
095d4f858b Updated gradle plugin 2019-02-08 17:54:14 -05:00
Nelson R. Perez
4c7c7b29b2 Fixed bug with the memo's nonce serialization format 2019-01-15 11:16:02 -05:00
Severiano Jaramillo
13faf6c253 Merge branch 'develop' of github.com:Agorise/graphenej into develop 2019-01-12 17:37:08 -06:00
Nelson R. Perez
709b7e2734 Adding a memo deserializer to the Gson instance that will take care of the 'get_transaction' API response 2019-01-10 22:17:33 -05:00
Severiano Jaramillo
f4be0fa596 Add a public method to obtain the currently selected node: getSelectedNode() 2019-01-10 14:20:31 -06:00
Nelson R. Perez
1c261746a2 Clearing the map between request id and the ApiCallable class because when we disconnect from one node, all previous message ids should be reset 2018-12-31 13:34:10 -05:00
Nelson R. Perez
cc28f55dd5 Merge branch 'develop' of github.com:Agorise/graphenej into develop 2018-12-26 17:48:50 -05:00
Nelson R. Perez
7a02e335a0 Setting write and read timeout to 5 seconds at the NetworkService 2018-12-26 17:47:59 -05:00
Nelson R. Perez
201d6957f8 - Added support for the "get_transaction" API call for the single-connection mode
- Overrided the toString method of the Transaction class
2018-12-26 17:45:41 -05:00
Nelson R. Perez
101b4a5aba Merge branch 'develop' of github.com:Agorise/graphenej into develop 2018-12-19 20:41:55 -05:00
Nelson R. Perez
2e909a02f1 Specifying a 5 seconds timeout on both the read and write operations when creating the websocket client 2018-12-19 20:41:48 -05:00
Nelson R. Perez
3b298ebf6b Merge branch 'develop' of github.com:Agorise/graphenej into develop 2018-12-19 12:50:55 -05:00
Nelson R. Perez
b54ae2cbae Added support for the 'get_assets' API call on the single-connection mode 2018-12-19 12:49:04 -05:00
Severiano Jaramillo
91a5ecdd7b Avoid NPE related carsh in NetworkService when trying to add a very high latency to a malfunctioning node. 2018-12-15 08:51:01 -06:00
Nelson R. Perez
0cba6a9f8d Added support for the broadcast_transaction API call in the single connection mode 2018-12-06 19:17:32 -05:00
Nelson R. Perez
9ceb3f048c Merge branch 'develop' of github.com:Agorise/graphenej into develop 2018-12-06 18:18:30 -05:00
Nelson R. Perez
84515d5296 Adding the getHash() public method to the Transaction class 2018-12-06 15:55:44 -05:00
Nelson R. Perez
ef41f3c44a Changing requirement for the get_required_fees API call 2018-12-03 20:50:53 -05:00
Nelson R. Perez
e1395a9d92 Modified the GetRequiredFees class and adjusted the sample app 2018-11-16 00:18:29 -05:00
Nelson R. Perez
39afcd26c2 Merge branch 'develop' of github.com:Agorise/graphenej into develop 2018-11-15 17:55:11 -05:00
Nelson R. Perez
843aacb859 Preventing a NullPointerException while handling a node disconnection 2018-11-15 17:54:57 -05:00
Nelson R. Perez
bcb4f8a964 Merge branch 'develop' of github.com:Agorise/graphenej into develop 2018-11-13 17:48:48 -05:00
Nelson R. Perez
af5896a160 Replaced the PriorityQueue by the PriorityBlockingQueue in the LatencyNodeProvider class due to the fact that multiple threads can access the same provider 2018-11-08 17:59:01 -05:00
Severiano Jaramillo
b6aab142b6 - Added a method to remove nodes from LatencyNodeProvider and implemented a HashSet to keep track of such removed nodes. The reason is that calls to this class are asynchronous and only removing a node from the mFullNodeHeap was not enough to guarantee that it was not going to be added again.
- Added a isRemoved variable to FullNode class, so that the object can carry itself the removal status information and be able to use the same publish subject to broadcast the status of the FullNode.
- Added a method to remove nodes from NodeLatencyVerifier, removed such nodes from pending node latency measurements map 'nodeURLMap' and publish/broadcast the FullNode information with isRemoved=true so that components listening can act accordingly.
- Make proper changes to sample app's RemoteNodeActivity so that it removes 'removed' nodes from the list.
2018-11-08 15:14:01 -06:00
Severiano Jaramillo
21311ea5a3 Create RemoveNodeActivity in the sample project that shows an updated list of nodes sorted by latency. This whole activity while be used to add and test the functionallity of removing a node from the nodes list when the app that uses graphenej decides so, and then reconnects to the next best node. 2018-11-08 13:01:09 -06:00
Severiano Jaramillo
94511daea9 Simple improvements to sample app layouts 2018-11-08 10:44:47 -06:00
Severiano Jaramillo
dee17a12be Moving away of NetworkService and graphenej in general the decision to close connection to the current node and retry with another one just because the node does not provide the info needed in PalmPay. Graphenej has to be as app agnostic as possible so a new public method 'removeCurrentNodeAndReconnect()' was implemeted to do the removal and reconnection, and the app that uses graphenej has to decide by its own metrics to remove the current connected node and call such public method. 2018-11-07 21:20:36 -06:00
Nelson R. Perez
c76548cbee Merge branch 'develop' of github.com:Agorise/graphenej into develop 2018-11-07 17:45:30 -05:00
Nelson R. Perez
f3731d140b Logging connection status updates and including a new node URL in the sample app 2018-11-07 17:36:35 -05:00
Severiano Jaramillo
214891fcc9 Added proper methods to deal with bitshares nodes that send 'trash info', which are nodes that potentially do not have installed the history plugin and thus do not respond properly to history related requests. As this information is needed for PalmPay we cannot rely on such nodes and have to try to connect to a different node. 2018-11-07 16:22:29 -06:00
Severiano Jaramillo
76713f0623 Merge branch 'develop' of github.com:Agorise/graphenej into develop 2018-11-06 11:37:08 -06:00
Severiano Jaramillo
c6cd21cdf0 Fix crash in NetworkService due to components other than NetworkServiceManager binding to the service without the proper initialization information. This initialization was moved to another method named bootstrapService which is only called from NetworkServiceManager after the NetworkService has been properly connected. 2018-11-06 11:36:11 -06:00
Nelson R. Perez
7a19220c51 Merge branch 'develop' of github.com:Agorise/graphenej into develop 2018-11-01 16:54:30 -05:00