Skip to content

Commit

Permalink
Fix transaction expiration
Browse files Browse the repository at this point in the history
  • Loading branch information
learnforpractice committed Oct 24, 2018
1 parent cffcb63 commit bac2693
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion libraries/vm/vm_cpython_ss/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ add_library(vm_cpython_ss SHARED
${CMAKE_SOURCE_DIR}/libraries/vm/libvmapi4python/eoslib.wrap.cpp
${CMAKE_SOURCE_DIR}/libraries/vm/libvmapi4python/db.wrap.cpp
${CMAKE_SOURCE_DIR}/libraries/vm/libvmapi4python/eoslib_.cpp
${CMAKE_SOURCE_DIR}/libraries/fc/src/crypto/xxhash.c
)

set_target_properties(vm_cpython_ss PROPERTIES LINK_FLAGS "${LINK_FLAGS}")

target_link_libraries(vm_cpython_ss PRIVATE python3-ss fc)
target_link_libraries(vm_cpython_ss PRIVATE python3-ss eosiolib_native)
#target_compile_options(vm_cpython_ss PUBLIC -DCYTHON_PEP489_MULTI_PHASE_INIT=0)

target_include_directories(vm_cpython_ss PRIVATE ${Boost_INCLUDE_DIR}
Expand Down
2 changes: 0 additions & 2 deletions programs/pyeos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ add_library(pyeos-shared interface/json.cpp interface/eosapi_.cpp
# ${CMAKE_SOURCE_DIR}/plugins/wallet_plugin/wallet_manager.cpp
)

target_compile_options(pyeos-shared PUBLIC -DCYTHON_PEP489_MULTI_PHASE_INIT=0)

if( APPLE )
target_link_libraries( pyeos-shared eosio_chain appbase softfloat db_api eos_api
eos_utilities fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS}
Expand Down
8 changes: 5 additions & 3 deletions programs/pyeos/interface/eosapi_.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,11 @@ static fc::variant determine_required_keys(const signed_transaction& trx) {

bool gen_transaction(signed_transaction& trx, bool sign, int32_t extra_kcpu = 1000, packed_transaction::compression_type compression = packed_transaction::none) {
auto info = get_info();

trx.expiration = info.head_block_time + tx_expiration;
// trx.expiration = fc::time_point::now() + tx_expiration;
if (get_vm_api()->has_option("manual-gen-block")) {
trx.expiration = fc::time_point::now() + tx_expiration;
} else {
trx.expiration = info.head_block_time + tx_expiration;
}

trx.set_reference_block(info.head_block_id);

Expand Down

0 comments on commit bac2693

Please sign in to comment.