mirror of
https://github.com/planetmint/planetmint.git
synced 2025-10-14 00:59:17 +00:00
adjusted utxo space to resemble outputs
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
This commit is contained in:
parent
dbf4e9085c
commit
b69a217289
@ -171,9 +171,11 @@ function init()
|
|||||||
utxos = box.schema.create_space('utxos', { if_not_exists = true })
|
utxos = box.schema.create_space('utxos', { if_not_exists = true })
|
||||||
utxos:format({
|
utxos:format({
|
||||||
{ name = 'id', type = 'string' },
|
{ name = 'id', type = 'string' },
|
||||||
{ name = 'transaction_id', type = 'string' },
|
{ name = 'amount' , type = 'unsigned' },
|
||||||
{ name = 'output_index', type = 'unsigned' },
|
{ name = 'public_keys', type = 'array' },
|
||||||
{ name = 'utxo', type = 'map' }
|
{ name = 'condition', type = 'map' },
|
||||||
|
{ name = 'output_index', type = 'number' },
|
||||||
|
{ name = 'transaction_id' , type = 'string' }
|
||||||
})
|
})
|
||||||
utxos:create_index('id', {
|
utxos:create_index('id', {
|
||||||
if_not_exists = true,
|
if_not_exists = true,
|
||||||
@ -189,7 +191,13 @@ function init()
|
|||||||
parts = {
|
parts = {
|
||||||
{ field = 'transaction_id', type = 'string' },
|
{ field = 'transaction_id', type = 'string' },
|
||||||
{ field = 'output_index', type = 'unsigned' }
|
{ field = 'output_index', type = 'unsigned' }
|
||||||
}})
|
}
|
||||||
|
})
|
||||||
|
utxos:create_index('utxo_by_public_keys', {
|
||||||
|
if_not_exists = true,
|
||||||
|
unique = false,
|
||||||
|
parts = {{field = 'public_keys[*]', type = 'string' }}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
-- Elections
|
-- Elections
|
||||||
|
Loading…
x
Reference in New Issue
Block a user