diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-07-28 20:24:14 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-07-28 20:24:14 +0100 |
commit | 922050a86faf173e8e82b3ab26200415dc30ed22 (patch) | |
tree | b63d70fa9a28140e2a49bac42a039606ab204261 /rules/bitcoin.lua | |
parent | 42466fa83a7f57d2e484bee163c90405ce6ff332 (diff) | |
download | rspamd-922050a86faf173e8e82b3ab26200415dc30ed22.tar.gz rspamd-922050a86faf173e8e82b3ab26200415dc30ed22.zip |
[Minor] Pet luacheck
Diffstat (limited to 'rules/bitcoin.lua')
-rw-r--r-- | rules/bitcoin.lua | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/rules/bitcoin.lua b/rules/bitcoin.lua index 0c9c79bac..cb6603e8c 100644 --- a/rules/bitcoin.lua +++ b/rules/bitcoin.lua @@ -121,16 +121,6 @@ local function gen_bleach32_table(input) return res and d or nil end -local function slice_table(tbl, first, last, step) - local sliced = {} - - for i = first or 1, last or #tbl, step or 1 do - sliced[#sliced+1] = tbl[i] - end - - return sliced -end - local function is_segwit_bech32_address(task, word) local semicolon_pos = string.find(word, ':') local address_part = word @@ -161,8 +151,7 @@ local function is_segwit_bech32_address(task, word) lua_util.debugm(N, task, 'check %s, %s decoded', word, decoded) if decoded and #decoded > 8 then - local c = 1 - local prefix = word:sub(1, semicolon_pos - 1) + prefix = word:sub(1, semicolon_pos - 1) local polymod_tbl = {} fun.each(function(byte) local b = bit.band(string.byte(byte), 0x1f) @@ -172,7 +161,7 @@ local function is_segwit_bech32_address(task, word) -- For semicolon table.insert(polymod_tbl, 0) - fun.each(function(byte) c = table.insert(polymod_tbl, byte) end, decoded) + fun.each(function(byte) table.insert(polymod_tbl, byte) end, decoded) lua_util.debugm(N, task, 'final polymod table: %s', polymod_tbl) return rspamd_util.btc_polymod(polymod_tbl) |