mirror of
https://github.com/planetmint/planetmint.git
synced 2025-03-30 15:08:31 +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:format({
|
||||
{ name = 'id', type = 'string' },
|
||||
{ name = 'transaction_id', type = 'string' },
|
||||
{ name = 'output_index', type = 'unsigned' },
|
||||
{ name = 'utxo', type = 'map' }
|
||||
{ name = 'amount' , type = 'unsigned' },
|
||||
{ name = 'public_keys', type = 'array' },
|
||||
{ name = 'condition', type = 'map' },
|
||||
{ name = 'output_index', type = 'number' },
|
||||
{ name = 'transaction_id' , type = 'string' }
|
||||
})
|
||||
utxos:create_index('id', {
|
||||
if_not_exists = true,
|
||||
@ -189,7 +191,13 @@ function init()
|
||||
parts = {
|
||||
{ field = 'transaction_id', type = 'string' },
|
||||
{ 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user