@@ -25,16 +25,17 @@ func NewSqlStore(db *loopdb.BaseDB) *SqlStore {
2525
2626// CreateStaticAddress creates a static address record in the database.
2727func (s * SqlStore ) CreateStaticAddress (ctx context.Context ,
28- addrParams * Parameters ) error {
28+ addrParams * Parameters , currentHeight int32 ) error {
2929
3030 createArgs := sqlc.CreateStaticAddressParams {
31- ClientPubkey : addrParams .ClientPubkey .SerializeCompressed (),
32- ServerPubkey : addrParams .ServerPubkey .SerializeCompressed (),
33- Expiry : int32 (addrParams .Expiry ),
34- ClientKeyFamily : int32 (addrParams .KeyLocator .Family ),
35- ClientKeyIndex : int32 (addrParams .KeyLocator .Index ),
36- Pkscript : addrParams .PkScript ,
37- ProtocolVersion : int32 (addrParams .ProtocolVersion ),
31+ ClientPubkey : addrParams .ClientPubkey .SerializeCompressed (),
32+ ServerPubkey : addrParams .ServerPubkey .SerializeCompressed (),
33+ Expiry : int32 (addrParams .Expiry ),
34+ ClientKeyFamily : int32 (addrParams .KeyLocator .Family ),
35+ ClientKeyIndex : int32 (addrParams .KeyLocator .Index ),
36+ Pkscript : addrParams .PkScript ,
37+ ProtocolVersion : int32 (addrParams .ProtocolVersion ),
38+ InitiationHeight : currentHeight ,
3839 }
3940
4041 return s .baseDB .Queries .CreateStaticAddress (ctx , createArgs )
@@ -106,5 +107,6 @@ func (s *SqlStore) toAddressParameters(row sqlc.StaticAddress) (
106107 ProtocolVersion : version .AddressProtocolVersion (
107108 row .ProtocolVersion ,
108109 ),
110+ InitiationHeight : row .InitiationHeight ,
109111 }, nil
110112}
0 commit comments