[CSM-296] Use `isUsed` flag from db
[CSM-296] Use `isUsed` flag from db

input-output-hk/cardano-sl,input-output-hk/pos-haskell-prototype,input-output-hk/pos-haskell-prototype,input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl,input-output-hk/cardano-sl,input-output-hk/cardano-sl