This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local loaded, prailude = pcall(require,"prailude") | |
if not loaded then | |
error("'prailude' package is required for RaiBlocks packet dissassembly. Please install it using luarocks for " .. _VERSION) | |
end | |
local blake2b_hash = prailude.util.blake2b.hash | |
local unpack_balance = prailude.util.unpack_balance | |
local unpack_account = prailude.util.unpack_account | |
local stohex = prailude.util.to_hex | |
local TCP_state = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function transaction_block = function(redis,...) | |
redis:echo("foo") | |
redis:multi() | |
redis:echo("bar") | |
local res = coroutine.yield() | |
assert(res[1]=='bar') | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local tslice = function(orig, first, last) | |
local copy = {} | |
while i=first, last do | |
table.insert(copy, orig[i]) | |
end | |
return copy | |
end | |
local function transactionize = function(self, transaction_blocks) | |
local transaction_coroutines = {} |