transaction is not submitting on stellar network!

transaction is not submitting on stellar network!

Manage alerts

Loading saved threads...

Prashant Gangwar · External communityPost link
External question — Stellar Stack Exchange Author: Prashant Gangwar Original post: https://stellar.stackexchange.com/questions/1943 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. load account is working fine and giving details of accounts means horizon is giving response but on transaction submitting getting error. local node setup done using docker image of stellar code app.get('/transferCoins', async function (req, res) { var sourceSecretKey = issuer.secret;// seed of acc from which tx process var sourceKeypair = StellarSdk.Keypair.fromSecret(sourceSecretKey); var sourcePublicKey = sourceKeypair.publicKey();//pub key of source acc var receiverPublicKey = account2.publicKey;// public key of reciever acc StellarSdk.Network.useTestNetwork(); console.log('1'); //var server = new StellarSdk.Server('https://horizon-testnet.stellar.org');//live netwrk var server = new StellarSdk.Server('http://localhost:8000', {allowHttp: true}); console.log('2'); const account = await server.loadAccount(sourcePublicKey) console.log('3'); var transaction = new StellarSdk.TransactionBuilder(account) .addOperation(StellarSdk.Operation.payment({ destination: receiverPublicKey, asset: StellarSdk.Asset.native(),//native asset lumen amount: '0.1', })) .addMemo(StellarSdk.Memo.text('coins sent xlm'))//optional .build(); console.log('4'); transaction.sign(sourceKeypair); const temp = await server.submitTransaction(transaction) console.log('submitted', temp._links); }); output 1 2 3 4 (node:23113) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): **Error: Request failed with status code 504** (node:23113) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Quote
Report
Prashant Gangwar · External communityPost link
External answer — Stellar Stack Exchange Author: Prashant Gangwar Original post: https://stellar.stackexchange.com/a/1944 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. changed the cathchup_recent = 1024 instead of 8096 and now ledeger is syncying correctely, wait for the ledeger to be come in synced state, even after this ledger is synced new recent ledeger will download and at this time horizon API interaction(only submission to network) is not possible. retrieval will work fine. in my case, the weak network connection may be the issue
Quote
Report

Post Reply

Checking account access…