X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=blobdiff_plain;f=federation%2Fsynchron%2Fmainchain_keeper.go;h=b7770371076beceb522cd68ca2f46a736eded3f5;hp=0884449e9a43117d1b503a43db7aa182b2d513d3;hb=feed757163f1e2a5d1d6194b5f0323cd60cf0a81;hpb=ae938cffc5c02b208a91eada0b7e69ddaa8a352d diff --git a/federation/synchron/mainchain_keeper.go b/federation/synchron/mainchain_keeper.go index 0884449e..b7770371 100644 --- a/federation/synchron/mainchain_keeper.go +++ b/federation/synchron/mainchain_keeper.go @@ -174,12 +174,14 @@ func (m *mainchainKeeper) processDepositTx(chain *orm.Chain, block *types.Block, ormTx := &orm.CrossTransaction{ ChainID: chain.ID, SourceBlockHeight: block.Height, + SourceBlockTimestamp: block.Timestamp, SourceBlockHash: blockHash.String(), SourceTxIndex: txIndex, SourceMuxID: muxID.String(), SourceTxHash: tx.ID.String(), SourceRawTransaction: string(rawTx), DestBlockHeight: sql.NullInt64{Valid: false}, + DestBlockTimestamp: sql.NullInt64{Valid: false}, DestBlockHash: sql.NullString{Valid: false}, DestTxIndex: sql.NullInt64{Valid: false}, DestTxHash: sql.NullString{Valid: false}, @@ -242,10 +244,11 @@ func (m *mainchainKeeper) processWithdrawalTx(chain *orm.Chain, block *types.Blo DestTxHash: sql.NullString{tx.ID.String(), true}, Status: common.CrossTxPendingStatus, }).UpdateColumn(&orm.CrossTransaction{ - DestBlockHeight: sql.NullInt64{int64(block.Height), true}, - DestBlockHash: sql.NullString{blockHash.String(), true}, - DestTxIndex: sql.NullInt64{int64(txIndex), true}, - Status: common.CrossTxCompletedStatus, + DestBlockHeight: sql.NullInt64{int64(block.Height), true}, + DestBlockTimestamp: sql.NullInt64{int64(block.Timestamp), true}, + DestBlockHash: sql.NullString{blockHash.String(), true}, + DestTxIndex: sql.NullInt64{int64(txIndex), true}, + Status: common.CrossTxCompletedStatus, }) if stmt.Error != nil { return stmt.Error