Comments (6)
So what are you trying to achieve? Is it your goal to make sure a transaction was properly included in a block after submitting it?
from eos-go.
I just want to test whether all APIs of EOS work well.
from eos-go.
I see.. GetTransaction require the history_api_plugin
to be enabled. Do you have that enabled in your config.ini ?
from eos-go.
I have enabled history_plugin and history_api_plugin, but the code still does not work.
I have test with cleos
and find it can returns the tx if I set block hint
.
1、don't set block hint
cleos -u http://10.41.14.195:8888 get transaction a1e92e03acb199875aa859e5502778be0bd4b3dbd5bc391a8011ec08401d0771
returns
Error 3040011: The transaction can not be found
Error Details:
Transaction a1e92e03acb199875aa859e5502778be0bd4b3dbd5bc391a8011ec08401d0771 not found in history and no block hint was given
2、set block hint
cleos -u http://10.41.14.195:8888 get transaction -b 848 a1e92e03acb199875aa859e5502778be0bd4b3dbd5bc391a8011ec08401d0771
{
"id": "a1e92e03acb199875aa859e5502778be0bd4b3dbd5bc391a8011ec08401d0771",
"trx": {
"receipt": {
"status": "executed",
"cpu_usage_us": 366,
"net_usage_words": 55,
"trx": [
1,{
"signatures": [
"SIG_K1_KgqDGK5MJwFDphSEQib5qxyaCEYuvuf1oB8Z42kKKM2YABL4yFvvDYjokvx3UEPndq1uLMpQnMRXV27eechDG6DgZCi9Y8"
],
"compression": "none",
"packed_context_free_data": "",
"packed_trx": "11d5995b4e03ef544bd9000000000100000000007a9ce200000000009031ad0100000000007a9ce20000000080ab26a7d902d7027b2274797065223a22706f7374222c2276657273696f6e223a312c22757269223a227376646476776566337172677267657267726567657267747267746572676567656740776569626f222c2264617461223a2265794a7a636d4d694f694a335a576c6962794973496d527559534936496a49784d7a45794d7a4930636a497a636d5a784d33517a4e4846305a6a4d305a6e4a6c6432646d5a584a6e636d566e5a534973496d6868633267694f694a7a646d526b646e646c5a6a4e78636d64795a3256795a334a6c5a3256795a3352795a33526c636d646c5a32566e49697769636d566a5a576c325a57526664476c745a534936496a49774d5467744d446b744d544e554d5445364d446b364d7a6b754d7a6b7a4d6a67314b7a41344f6a4177496e303d222c22636f6d6d69745f74696d65223a22323031382d30392d31335431313a30393a33392e3339333331332b30383a3030227d00"
}
]
},
"trx": {
"expiration": "2018-09-13T03:10:09",
"ref_block_num": 846,
"ref_block_prefix": 3645592815,
"max_net_usage_words": 0,
"max_cpu_usage_ms": 0,
"delay_sec": 0,
"context_free_actions": [],
from eos-go.
can add a method in API?
from eos-go.
@abourget Thanks.
I found the root is that I have not configured the filter-on
so history_plugin has not make index for actions.
BTW, GetTransactionByIDAndHint
is convenient if it will be added into the API
from eos-go.
Related Issues (20)
- run demo code ,an error happend when download streamingfast HOT 1
- Got an error when trying to import PVT_K1 format private key HOT 17
- how to push actions with raw json data? HOT 2
- {"code":500,"message":"Internal Service Error","error":{"code":3050003,"name":"eosio_assert_message_exception","what":"eosio_assert_message assertion failure","details":[{"message":"assertion failure with message: Cannot wear this item at the moment","file":"cf_system.cpp","line_number":14,"method":"eosio_assert"}]}} HOT 1
- get_actions result unmarsha into Go struct ActionsResp error
- The "next_key" field is missing in the GetTable rows API response HOT 2
- How to implement custom actions ,How to get serializetransaction,(PVT_K1 )Unable to verify, output public key does not match HOT 1
- (PVT_K1 )Unable to verify, output public key does not match HOT 5
- How to get serializetransaction?eosjs: api.serializeTransaction(sTransaction) HOT 1
- How to implement custom actions? HOT 1
- How to use the symbol is wax or other, and there are digits
- How to be a maintainer with merge permission HOT 3
- Pack action data issue after compiling contract with the Leap CDT 3.0.1 HOT 5
- Update `/v1/chain/push_transaction` expected response structure HOT 3
- Transaction Signing Issue with Custom Variant Definition HOT 8
- ecc.PublicKey is not string HOT 6
- /get_block does not get to the previous blocks HOT 2
- Calling a smart contract action HOT 2
- ecc privatekey signature error HOT 2
- There should be a powerup update for calculations. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eos-go.