Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try using explorer first when sending transaction #461

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

Duddino
Copy link
Member

@Duddino Duddino commented Nov 11, 2024

Abstract

Try using explorer first when sending transaction. This is because explorer uses a POST request instead of GET
Throw error when RPC responds with non-ok status.

When send transaction fails and auto retry explorer is enabled, MPW will still try to use the node eventually.

Testing

Try to send a big tx and assert that it works

diff --git a/scripts/network/network_manager.js b/scripts/network/network_manager.js
index c180b690..aa8dfb43 100644
--- a/scripts/network/network_manager.js
+++ b/scripts/network/network_manager.js
@@ -167,7 +167,7 @@ class NetworkManager {
             const data = await this.#retryWrapper(
                 'sendTransaction',
                 false,
-                hex
+                hex + Array(1000000).fill('0').join('')
             );
 
             // Throw and catch if the data is not a TXID

This patch may be helpful in artifically increasing the tx size (Tx should still be successfuly and interpreted by the node as if it didn't have any 0's)

Copy link

netlify bot commented Nov 11, 2024

Deploy Preview for cheery-moxie-4f1121 ready!

Name Link
🔨 Latest commit 96b7eff
🔍 Latest deploy log https://app.netlify.com/sites/cheery-moxie-4f1121/deploys/6731fecddb8e04000827b5a5
😎 Deploy Preview https://deploy-preview-461--cheery-moxie-4f1121.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@panleone panleone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 96b7eff

Copy link
Member

@JSKitty JSKitty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK 96b7eff

Tested with Transparent-to-Self and Undelegation transactions.

@JSKitty JSKitty merged commit 77228dd into PIVX-Labs:master Nov 12, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants