Commit graph

297 commits

Author SHA1 Message Date
Nelson R. Perez
7a19220c51 Merge branch 'develop' of github.com:Agorise/graphenej into develop 2018-11-01 16:54:30 -05:00
Nelson R. Perez
f940d49cfc Added support for the 'get_account_balances' API call in the single-connection mode 2018-11-01 16:54:03 -05:00
Nelson R. Perez
eecc945259 Added a toString() to the AssetAmount class 2018-11-01 16:53:19 -05:00
Severiano Jaramillo
0b1caeb372 Update targetSdkVersion and compileSdkVersion. 2018-10-31 09:45:24 -06:00
Nelson R. Perez
d66c8f0ff8 Removed unneeded log 2018-10-24 19:52:50 -05:00
Nelson R. Perez
0fa75dcf22 Removed unneeded system log 2018-10-23 15:32:47 -05:00
Nelson R. Perez
878bc52d78 Fixed problem with the comparation function between two FullNode instances 2018-10-23 15:30:37 -05:00
Nelson R. Perez
b70881dfb5 Updated build tools version 2018-10-23 12:05:00 -05:00
Nelson R. Perez
a6e5910144 Fixing issues with the LatencyNodeProvider#getSortedNodes() method 2018-10-22 13:53:47 -05:00
Nelson R. Perez
8fb9bc57d6 Automatically trying to connect to the best node after DEFAULT_INITIAL_DELAY milliseconds, regardless of the completion of the node latency verifications 2018-10-19 00:10:11 -05:00
Nelson R. Perez
a5f0ba1345 Merge branch 'develop' of github.com:Agorise/graphenej into develop 2018-10-18 18:00:19 -05:00
Nelson R. Perez
d37d35e0c6 Returning latency as Long.MAX_VALUE instead of zero to non-initialized FullNode instances 2018-10-18 17:57:27 -05:00
Nelson R. Perez
63eebf11c4 Exposing an interface that allows the fine tuning of the alpha parameter used to calculate the exponential moving average of measured latencies 2018-10-18 17:36:34 -05:00
Nelson R. Perez
3a19808ac5 Moved the node list information out of the library, this must be provided by the application now 2018-10-18 12:14:05 -05:00
Nelson R. Perez
36420e7f56 Trying to fix a NullPointerException by checking the refeence and enclosing the whole chunk of code into a syncronized block 2018-10-15 18:35:26 -05:00
Nelson R. Perez
d25a1f3fa0 Reduced the connection timeout from the default of 10 seconds to 2 seconds 2018-10-12 18:36:11 -05:00
Nelson R. Perez
d75957e5d1 Adding a new constructor to the GetFullAccounts API wrapper class 2018-10-11 19:46:03 -05:00
Nelson R. Perez
69e5740d00 Merge branch 'develop' of github.com:Agorise/graphenej into develop 2018-10-09 18:54:51 -05:00
Nelson R. Perez
c773926ef7 Givingh the AccountOptionsDeserializer class more control over when it should de-serialize its UserAccount attribute and when it should skip it in order to prevent infinite recursion loops 2018-10-09 18:54:41 -05:00
Severiano Jaramillo
5ffda797b7 Merge branch 'develop' of github.com:Agorise/graphenej into develop 2018-10-09 11:33:08 -05:00
Severiano Jaramillo
8bbf68ce6d Solve issue that caused Asset id's being saved localized into the database. It should always be saved in plain english. 2018-10-09 11:32:46 -05:00
Nelson R. Perez
b361cf5830 Added support for the 'get_key_references' API call in the single-connection mode 2018-10-08 19:55:49 -05:00
Nelson R. Perez
2618a6a3a0 Merge branch 'develop' of github.com:Agorise/graphenej into develop 2018-10-04 13:44:11 -05:00
Nelson R. Perez
5a113ad7cc Added support fot the get_dynamic_global_properties API call in the single-connection mode 2018-10-04 10:13:55 -05:00
Nelson R. Perez
857236a1ea Moved the service binding to the onActivityResumed callback 2018-10-02 12:36:36 -05:00
Nelson R. Perez
25b7e6c8c6 Adding a very high latency to nodes that fail their connection 2018-10-02 01:35:53 -05:00
Nelson R. Perez
694572b18d Merge branch 'develop' of github.com:Agorise/graphenej into develop 2018-10-01 23:59:34 -05:00
Nelson R. Perez
740a75ae30 Updated the gradle plugin version 2018-10-01 23:58:23 -05:00
Nelson R. Perez
5ef4ebfca7 Preventing a NullPointerException by checking the nodeLatencyVerifier reference first 2018-10-01 23:58:03 -05:00
Severiano Jaramillo
a2e1bbd19c Remove non-working dexnode.net bitshares node 2018-09-28 22:32:01 -05:00
Severiano Jaramillo
94423470ce Update gradle version and remove app version number from the Manifest 2018-09-28 20:54:33 -05:00
Nelson R. Perez
b37bb9dce0 Merge branch 'develop' of github.com:Agorise/graphenej into develop 2018-09-27 17:43:45 -05:00
Nelson R. Perez
e357ffba66 Removed debug logs 2018-09-27 17:42:51 -05:00
Severiano Jaramillo
9374b125a1 Use a more descriptive value (simulating infinite) when the node could not be reached, in NodeLatencyVerifier 2018-09-27 13:10:28 -05:00
Severiano Jaramillo
bb14110b09 Fix small issue in the NodeLatencyVerifier that caused incorrect (very small) readings to no-reachable nodes due to no internet connection. 2018-09-27 11:33:18 -05:00
Nelson R. Perez
d109d86bf3 - Storing connectivity status at the FullNode class
- Flipping this flag accordingly at the NetworkService whenever we connect/disconnect from a specific node
- Notifying the NodeLatencyVerifier of this change
2018-09-26 17:17:31 -05:00
Severiano Jaramillo
3bdfb777bf Avoid adding repeated nodes to the list of nodes in NetworkService. 2018-09-26 12:05:00 -05:00
Nelson R. Perez
e107c014f0 The network service will retry a connection after 5 seconds in case of socket failure 2018-09-23 20:50:39 -05:00
Nelson R. Perez
35570cb4a6 Fixing a potential NullPointerException at the NetworkService 2018-09-21 13:29:47 -05:00
Nelson R. Perez
ede7265989 NodeLatencyVerifier
- Using an HttpUrl instance as a key to the map of FullNode instances, we were using simple String here before, but turned out not to be too reliable

NetworkService
- Introducing the NodeLatencyVerifier instance into the NetworkService, and making its use optional
- In case the user opts to use the node-latency verification, the initial connection is delayed until we obtain a measurement of all nodes
- Exposing a PublishSubject, this allows users of the library to get notified of the node latency measurements

NetworkServiceManager
- A boolean flag is now used to decide whether or not to start a NetworkService instance with the node-latency verification feature ON
2018-09-20 21:51:14 -05:00
Nelson R. Perez
776630dd57 - Introduced some instrumented test dependencies
- Fixed a problem in the LatencyNodeProvider#updateNode(FullNode) method
- Fixed a bug in the LatencyNodeProvider#getSortedNodes() method
- Introducing the NodeLatencyVerifier class
2018-09-20 16:21:25 -05:00
Nelson R. Perez
ccf61858e4 Modified the NetworkService and the NetworkServiceManager classes in order to pass arguments to the service via Intent extras and to allow delayed network connection 2018-09-19 16:44:26 -05:00
Nelson R. Perez
25222e5ea9 Introducing the NodeProvider interface and its implementation LatencyNodeProvider 2018-09-18 11:15:07 -05:00
Nelson R. Perez
8c89c93935 Added a couple of nodes to the list 2018-09-18 11:14:34 -05:00
Nelson R. Perez
83ce2de14d Introducing the FullNode class, which keeps track of the delay to each full node it represents 2018-09-17 17:48:49 -05:00
Nelson R. Perez
6a2939ab20 Added a getter and setter to the mNodeUrls private attribute of the NetworkService class 2018-09-17 12:21:48 -05:00
Nelson R. Perez
9329d59ce7 Moved the Memo class 2018-09-17 12:19:22 -05:00
Nelson R. Perez
66b0ce7cc1 Removed unused log 2018-09-17 12:13:19 -05:00
Nelson R. Perez
a3aa9956e3 Adding serialization capabilities for parameters that are themselves arrays of Integer or Long types, like what we need to properly serialize the 'get_account_history_by_operations' API call 2018-09-13 15:50:18 -05:00
Nelson R. Perez
4f39dac4c2 Registering the proper de-serializer on the GetRelativeAccountHistory API response handler Gson instance 2018-09-11 17:58:00 -05:00
Nelson R. Perez
0437919bb8 Fixing problem with the de-serialization procedure of the 'get_full_accounts' API call response 2018-09-06 23:46:42 -05:00
Nelson R. Perez
39048b1096 Adding the de-serializer of the BaseOperation class to the Gson instance used to handle the notification message 2018-09-06 23:30:59 -05:00
Nelson R. Perez
6abd71252e Added support for the 'get_full_accounts' API call in the single connecton mode 2018-09-06 18:09:18 -05:00
Nelson R. Perez
7d5cfbf14b Merge branch 'feat_central_broker' of github.com:Agorise/graphenej into feat_central_broker 2018-09-05 21:05:13 -05:00
Nelson R. Perez
229590457b - Added support for the 'get_account_history_by_operations' API call
- Introduced a test case for the de-serialization of the HistoryOperationDetail object instance
- Making the sample app use the newly introduced 'get_account_history_by_operations' API call
2018-09-05 21:04:46 -05:00
Nelson R. Perez
52e0196744 Merge branch 'feat_central_broker' of github.com:Agorise/graphenej into feat_central_broker 2018-08-31 19:07:14 -05:00
Nelson R. Perez
63bb5a6dac Sending id as a number inside the parameters array of the 'set_subscribe_callback' instead of a string 2018-08-31 19:07:05 -05:00
Nelson R. Perez
f8326093a2 Adjusted code in order to broadcast internally responses with empty results, which were skipped before 2018-08-31 18:11:57 -05:00
Nelson R. Perez
7e2ef7b705 Added support for message subscriptions on the single connection mode 2018-08-30 22:32:50 -05:00
Nelson R. Perez
d2390b0a45 Updating the private key whenever the brainkey's sequence number is updated 2018-08-28 21:26:35 -05:00
Nelson R. Perez
1e2716e89e Added a setter to the BrainKey sequence number 2018-08-28 20:25:11 -05:00
Nelson R. Perez
81d61986ea Added support for the GetLimitOrders API call in the single connection mode 2018-08-16 23:59:14 -05:00
Nelson R. Perez
bad3bdaff8 Broadcasting the ConnectionStatusUpdate.AUTHENTICATED event 2018-08-09 09:38:25 -05:00
Nelson R. Perez
de3dc2b120 Added support for the get_account_by_name API call wrapper in the single connection mode 2018-08-08 18:53:57 -05:00
Nelson R. Perez
66ce8a4ba4 - Modified the ConnectionStatusUpdate class in order to allow it to send more than just connection/disconnection events
- Allowing the NetworkService to be queried about specific API ids
2018-07-26 17:13:55 -05:00
Nelson R. Perez
364c31c78c Merge branch 'feat_central_broker' of github.com:Agorise/graphenej into feat_central_broker 2018-07-25 13:08:30 -05:00
Nelson R. Perez
140cab48cd Added support for the list_assets API call wrapper in the single connection mode 2018-07-25 13:08:09 -05:00
Nelson R. Perez
5955e1c823 Compacting code a little bit 2018-07-25 11:33:12 -05:00
Nelson R. Perez
222fd88afa - Added partial support for the 'get_objects' API call in the single connection mode
- Changed the layout of the sample app in order to present a list of all supported API calls in the first activity
- Introducing a specific activity to perform the API calls in the sample app
2018-06-28 23:42:40 -05:00
Nelson R. Perez
2d579df6af Upgrading gradle plugin and rxjava versions 2018-06-27 15:30:43 -05:00
Nelson R. Perez
415e41ae11 Added support for the get_account_history API call 2018-06-20 17:23:15 -05:00
Nelson R. Perez
05699df638 Introducing support for the LookupAssetSymbol api call wrapper in the single connection mode 2018-06-16 14:54:17 -05:00
Nelson R. Perez
918d27b5cd Fixed problem caused by the lack of registered API id for calls that don't require any API 2018-06-15 18:26:59 -05:00
Nelson R. Perez
7197ea4078 Fixed a big problem that was causing some random responses not to be de-serialized due to a mistake in the removal of entries in the request class map 2018-06-14 22:16:34 -05:00
Nelson R. Perez
be33c91823 Only sending a message if we have the API id 2018-06-14 11:50:35 -05:00
Nelson R. Perez
3159a44c3a Returning -1 if no message was sent 2018-06-14 00:02:10 -05:00
Nelson R. Perez
7c84187681 Deserializing the response to the get_market_history API call and checking the websocket for a null reference before using it 2018-06-13 22:18:36 -05:00
Nelson R. Perez
0df3fad6c0 Introducing support for the GetMarketHistory api call wrapper using the single connection mode 2018-06-12 23:27:06 -05:00
Nelson R. Perez
85bf1d1ba1 Introducing support for the GetBlockHeader api call in the single-connection mode 2018-06-12 13:34:42 -05:00
Nelson R. Perez
4f6b628891 Introducing the SkipAssetOptionsStrategy class, used to avoid falling into an infinite loop while deserializing/serializing results from the get_relative_account_history API call 2018-06-11 23:48:35 -05:00
Nelson R. Perez
7582fefd0e Introducing support for the GetRelativeAccountHistory api call in the single-connection mode 2018-06-11 15:40:01 -05:00
Nelson R. Perez
8ed74dbaed GetBlock constructor now receives an argument of type long 2018-06-11 15:12:48 -05:00
Nelson R. Perez
56c808c353 Added a toString to the PublicKey class 2018-06-11 15:12:16 -05:00
Nelson R. Perez
c71d9802ba Correctly deserializing the GetRequiredFees API call's response 2018-06-06 10:50:14 -05:00
Nelson R. Perez
7c79c7f5bf - Introduced the DeserializationMap class in order to keep a mapping between request and response classes, and how to de-serialize them
- Fixed an infinite loop that was introduced in the de-serialization of the AccountProperties
- Implementing the GetAccounts wrapper in the sample app
2018-06-05 23:11:28 -05:00
Nelson R. Perez
c956ebadc1 Fixed problem with the new GetAccounts API wrapper 2018-06-04 22:39:44 -05:00
Nelson R. Perez
aa758a09e0 Added support for the GetAccount api call in the new service-based single connection scheme 2018-06-04 22:10:03 -05:00
Nelson R. Perez
3125f07da5 Merge branch 'feat_central_broker' of github.com:Agorise/graphenej into feat_central_broker 2018-06-01 21:45:37 -05:00
Nelson R. Perez
7abf7343a1 Added 'isLifetime' property to UserAccount class 2018-06-01 21:45:07 -05:00
Nelson R. Perez
935b0d2575 Using the OperationHistoryDeserializer in the GetRelativeAccountHistory api call 2018-05-31 23:26:15 -05:00
Nelson R. Perez
915b446d1d Extended the BrainKeyTest in order to cover OpenLedger's accounts 2018-05-31 15:52:26 -05:00
Nelson R. Perez
c407b98779 Commenting the publication code 2018-05-31 15:52:26 -05:00
Nelson R. Perez
794df5c99f Adding debug and preRelease build types and removed commented lines 2018-05-31 15:52:26 -05:00
Nelson R. Perez
636de75fb8 Gradle update 2018-05-31 15:52:26 -05:00
Nelson R. Perez
87421e210c - Properly resetting the connection status in case of an EOFException
- Allowing the NetworkService to be used with an externally provided list of node URLs
2018-05-31 15:52:26 -05:00
Nelson R. Perez
e118b8df04 Added a new #isConnected() method to allow an external party to query the current status of the connection 2018-05-31 15:52:26 -05:00
Nelson R. Perez
a36f9811f9 Added javadocs and sources compilation tasks 2018-05-31 15:52:26 -05:00
Nelson R. Perez
0b79231a3a Detecting and deserializing operation history objects 2018-05-31 15:52:26 -05:00
Nelson R. Perez
5dea8a6eb4 Renamed HistoricalTransfer to OperationHistory 2018-05-31 15:52:26 -05:00
Nelson R. Perez
0a4c0c0c9d Added an order book getter to the OrderBook class 2018-05-31 15:52:26 -05:00