Support multiple backends per domain with the help of some lua

This commit is contained in:
Thomas Lynch
2023-04-06 22:40:03 +10:00
parent 35668c9b58
commit 40da57544a
4 changed files with 34 additions and 7 deletions

View File

@@ -41,6 +41,14 @@ function _M.split(inputstr, sep)
return t
end
-- check if elem in list
function _M.contains(list, elem)
for _, v in pairs(list) do
if v == elem then return true end
end
return false
end
-- return true if hash passes difficulty
function _M.checkdiff(hash, diff)
if #hash == 0 then