@@ -1096,107 +1096,7 @@ func makeABCIData(msgResponses []*codectypes.Any) ([]byte, error) {
1096
1096
return proto .Marshal (& sdk.TxMsgData {MsgResponses : msgResponses })
1097
1097
}
1098
1098
1099
- func createEvents (cdc codec.Codec , events sdk.Events , msg sdk.Msg , reflectMsg protoreflect.Message ) (sdk.Events , error ) {
1100
- eventMsgName := sdk .MsgTypeURL (msg )
1101
- msgEvent := sdk .NewEvent (sdk .EventTypeMessage , sdk .NewAttribute (sdk .AttributeKeyAction , eventMsgName ))
1102
-
1103
- // we set the signer attribute as the sender
1104
- signers , err := cdc .GetReflectMsgSigners (reflectMsg )
1105
- if err != nil {
1106
- return nil , err
1107
- }
1108
- if len (signers ) > 0 && signers [0 ] != nil {
1109
- addrStr , err := cdc .InterfaceRegistry ().SigningContext ().AddressCodec ().BytesToString (signers [0 ])
1110
- if err != nil {
1111
- return nil , err
1112
- }
1113
- msgEvent = msgEvent .AppendAttributes (sdk .NewAttribute (sdk .AttributeKeySender , addrStr ))
1114
- }
1115
-
1116
- // verify that events have no module attribute set
1117
- if _ , found := events .GetAttributes (sdk .AttributeKeyModule ); ! found {
1118
- if moduleName := sdk .GetModuleNameFromTypeURL (eventMsgName ); moduleName != "" {
1119
- msgEvent = msgEvent .AppendAttributes (sdk .NewAttribute (sdk .AttributeKeyModule , moduleName ))
1120
- }
1121
- }
1122
-
1123
- return sdk.Events {msgEvent }.AppendEvents (events ), nil
1124
- }
1125
-
1126
- // PrepareProposalVerifyTx performs transaction verification when a proposer is
1127
- // creating a block proposal during PrepareProposal. Any state committed to the
1128
- // PrepareProposal state internally will be discarded. <nil, err> will be
1129
- // returned if the transaction cannot be encoded. <bz, nil> will be returned if
1130
- // the transaction is valid, otherwise <bz, err> will be returned.
1131
- func (app * BaseApp ) PrepareProposalVerifyTx (tx sdk.Tx ) ([]byte , error ) {
1132
- bz , err := app .txEncoder (tx )
1133
- if err != nil {
1134
- return nil , err
1135
- }
1136
-
1137
- _ , _ , _ , err = app .runTx (execModePrepareProposal , bz )
1138
- if err != nil {
1139
- return nil , err
1140
- }
1141
-
1142
- return bz , nil
1143
- }
1144
-
1145
- // ProcessProposalVerifyTx performs transaction verification when receiving a
1146
- // block proposal during ProcessProposal. Any state committed to the
1147
- // ProcessProposal state internally will be discarded. <nil, err> will be
1148
- // returned if the transaction cannot be decoded. <Tx, nil> will be returned if
1149
- // the transaction is valid, otherwise <Tx, err> will be returned.
1150
- func (app * BaseApp ) ProcessProposalVerifyTx (txBz []byte ) (sdk.Tx , error ) {
1151
- tx , err := app .txDecoder (txBz )
1152
- if err != nil {
1153
- return nil , err
1154
- }
1155
-
1156
- _ , _ , _ , err = app .runTx (execModeProcessProposal , txBz )
1157
- if err != nil {
1158
- return nil , err
1159
- }
1160
-
1161
- return tx , nil
1162
- }
1163
-
1164
- func (app * BaseApp ) TxDecode (txBytes []byte ) (sdk.Tx , error ) {
1165
- return app .txDecoder (txBytes )
1166
- }
1167
-
1168
- func (app * BaseApp ) TxEncode (tx sdk.Tx ) ([]byte , error ) {
1169
- return app .txEncoder (tx )
1170
- }
1171
-
1172
1099
// Close is called in start cmd to gracefully cleanup resources.
1173
1100
func (app * BaseApp ) Close () error {
1174
- var errs []error
1175
-
1176
- // Close app.db (opened by cosmos-sdk/server/start.go call to openDB)
1177
- if app .db != nil {
1178
- app .logger .Info ("Closing application.db" )
1179
- if err := app .db .Close (); err != nil {
1180
- errs = append (errs , err )
1181
- }
1182
- }
1183
-
1184
- // Close app.snapshotManager
1185
- // - opened when app chains use cosmos-sdk/server/util.go/DefaultBaseappOptions (boilerplate)
1186
- // - which calls cosmos-sdk/server/util.go/GetSnapshotStore
1187
- // - which is passed to baseapp/options.go/SetSnapshot
1188
- // - to set app.snapshotManager = snapshots.NewManager
1189
- if app .snapshotManager != nil {
1190
- app .logger .Info ("Closing snapshots/metadata.db" )
1191
- if err := app .snapshotManager .Close (); err != nil {
1192
- errs = append (errs , err )
1193
- }
1194
- }
1195
-
1196
- return errors .Join (errs ... )
1197
- }
1198
-
1199
- // GetBaseApp returns the pointer to itself.
1200
- func (app * BaseApp ) GetBaseApp () * BaseApp {
1201
- return app
1101
+ return nil
1202
1102
}
0 commit comments